Skip to content

test: pass --url, required by server 2.4.0 - #55

Merged
lakhansamani merged 1 commit into
mainfrom
fix/url-required-in-tests
Aug 14, 2026
Merged

test: pass --url, required by server 2.4.0#55
lakhansamani merged 1 commit into
mainfrom
fix/url-required-in-tests

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Why

authorizerdev/authorizer#764 made --url mandatory — the server exits at boot without it. Both suites spawn the server through testcontainers with no --url, so every test would fail at container startup once the image pin moves to 2.4.0 stable.

The pin is 2.4.0-rc.13 today, which predates the requirement, so this is a no-op right now — it prevents a breakage rather than fixing a current failure.

Why the in-container address

--url is the server's own canonical address and must be passed at startup, but the testcontainers host port is only knowable after .start(). So the value is the address the server actually binds inside the container (http://localhost:8080), not the mapped port the suite dials.

That difference only affects generated email links and the JWT iss claim. Neither suite asserts on either — verified by grep: no iss assertions, and no email-link parsing (the SMTP config points at ethereal but nothing reads the messages back).

Verification

npx tsc --noEmit clean. Not run against a live 2.4.0 image — that needs Docker and a stable build that does not exist yet; the change is argument-only.

The server exits at boot without --url as of authorizerdev/authorizer#764,
so both suites would fail at container startup once the image pin moves
to 2.4.0 stable. The pin is 2.4.0-rc.13 today, so this is a no-op now.

Uses the in-container address rather than the mapped host port, which is
only knowable after start. The difference affects generated email links
and the JWT iss claim; neither suite asserts on either.
@lakhansamani
lakhansamani merged commit 9853cc6 into main Aug 14, 2026
0 of 2 checks passed
@lakhansamani
lakhansamani deleted the fix/url-required-in-tests branch August 14, 2026 06:21
lakhansamani added a commit that referenced this pull request Aug 19, 2026
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.
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