Skip to content

fix(test): bind the port advertised as --url - #56

Merged
lakhansamani merged 1 commit into
mainfrom
fix/test-url-must-match-bound-port
Aug 19, 2026
Merged

fix(test): bind the port advertised as --url#56
lakhansamani merged 1 commit into
mainfrom
fix/test-url-must-match-bound-port

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Two magic-link tests have failed on main since #55.

redirect_uri is validated against --url. #55 set --url=http://localhost:8080 — the address inside the container — while the suite reaches the server through a testcontainers-mapped random host port and sends redirectURL on that mapped host. The server refuses it (Invalid redirect URI), magic_link_login returns no data, and no verification request is created, so the follow-up verify email test fails too.

Reproduced against rc.23 outside the suite: identical args with --url matching the reachable address succeed; with it pointing elsewhere they fail.

Fix: ask the OS for a free port, bind the container to it, and hand the same address to --url.

Also bumps the pinned test image from 2.4.0-rc.13 to 2.4.0-rc.23.

Local run: 11 suites, 104 tests, all passing.

redirect_uri is validated against --url, so setting it to
localhost:8080 while the suite reached a testcontainers-mapped random
port made magic_link_login refuse with "Invalid redirect URI" and
return no data - two failures on main since #55. Ask the OS for a free
port, bind the container to it, and give the same address to --url.

Also pins the test server image to 2.4.0-rc.23; rc.13 predates every
change under test.
@lakhansamani
lakhansamani merged commit 97cea81 into main Aug 19, 2026
2 checks passed
@lakhansamani
lakhansamani deleted the fix/test-url-must-match-bound-port branch August 19, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant