Skip to content

fix(tests): stop the auth0 fixture reaching the network - #6783

Open
chiruu12 wants to merge 1 commit into
keephq:mainfrom
chiruu12:fix/auth0-domain-fixture-scheme
Open

fix(tests): stop the auth0 fixture reaching the network#6783
chiruu12 wants to merge 1 commit into
keephq:mainfrom
chiruu12:fix/auth0-domain-fixture-scheme

Conversation

@chiruu12

@chiruu12 chiruu12 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #6816

unit-tests has been erroring on every PR with four setup timeouts in tests/test_auth.py:

ERROR at setup of test_api_key_with_header[MULTI_TENANT] - Failed: Timeout >20.0s
socket.gaierror: [Errno -3] Temporary failure in name resolution
Failed to fetch OpenID discovery document from
  https://https://auth0domain.com/.well-known/openid-configuration

Two things behind it. Both live in tests/fixtures/client.py.

The MULTI_TENANT branch sets AUTH0_DOMAIN to https://auth0domain.com. Every other reader of that variable takes a bare host: auth0_utils formats it into "https://{}/api/v2/", the verifier builds self.issuer the same way, and tests/test_auth_new.py uses test-domain.auth0.com. With a scheme already on it the verifier asks the resolver for a host literally named https, which is the gaierror above.

The fixture also stubs OIDC discovery only for the dict form of the parameter, and MULTI_TENANT loads the same Auth0 verifier with no stub at all, so the call went out for real. On a runner without DNS that burns the whole 20 seconds before the test has started.

So: bare host, and the stub now covers both forms.

Verified by counting outbound DNS lookups during test_api_key_with_header[MULTI_TENANT]:

parent commit:  ['https']
this commit:    []

tests/test_auth.py --non-integration: 22 passed, 1 skipped, on both. The count is the evidence; the pass is not, since a resolver that answers quickly hides this.

Copilot AI lite review requested due to automatic review settings September 7, 2026 22:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

[🐛 Bug]: auth0 test fixture resolves a host named "https", erroring unit-tests on every PR

2 participants