Skip to content

test: Pass file URLs to the Curl retriever tests - #989

Merged
DannyvdSluijs merged 1 commit into
jsonrainbow:mainfrom
Amoifr:fix-curl-test-file-urls
Oct 24, 2026
Merged

DannyvdSluijs merged 1 commit into
jsonrainbow:mainfrom
Amoifr:fix-curl-test-file-urls

Conversation

@Amoifr

@Amoifr Amoifr commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Since the GitHub runner image 20261015, the two CurlTest file tests fail on every PR (see #944): its newer libcurl rejects a bare file path with "URL rejected: No host part in the URL", so the curl_exec mock never matches and the real one returns false. The last green runs used the 20261012 image, and the same two tests fail locally with curl 8.18 on main.

The tests now pass file:// URLs, and the curl_exec mock matches them. Only the tests change: Curl::retrieve() still receives whatever URI the caller gives it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The test-only changes keep inputs and mock expectations consistent, with no identified correctness issues.

No open issues 🎉

What changed in this PR

Updates the Curl retriever tests to use explicit file:// URLs accepted by newer libcurl versions, without changing production retrieval behavior.

Changes:

  • Pass file URLs in both file-retrieval tests.
  • Align mock URL matching and read the response body directly from the fixture path.
File Description
tests/​Uri/​Retrievers/​CurlTest.php Updates test inputs and mock matching to use file URLs.

Review effort: Balanced

@DannyvdSluijs
DannyvdSluijs merged commit 9c7f7b4 into jsonrainbow:main Oct 24, 2026
18 checks passed
github-actions Bot added a commit that referenced this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants