Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use reserved testing domain example.test (RFC 2606) #492

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

daniel-mader
Copy link
Collaborator

@daniel-mader daniel-mader commented Feb 14, 2025

Description of change

Error message

The test test_qr_code_scanned_handle_siopv2_authorization_request runs successfully locally, but fails in CI.

Expected: Error while fetching configuration: failed to parse response into JSON value
==> The external system could be reached, but the response cannot be parsed into a JSON value

Actual: Error while fetching configuration: failed to get response from resource url: https://example.com/.well-known/did-configuration.json
==> The external system could not be reached at all

Root cause

One of the problems for this inconsistency is that an actually existing domain is used for many integration tests: example.com. It thereby needs to be treated as "external dependency" - even if it's just for testing purposes.
Depending on whether the test execution environment has internet access or not, the HTTP responses when trying to fetch from that resource are differing.

Solution

There are TLDs specifically reserved for testing, such as .test or .example.

Links to any relevant issues

Be sure to reference any related issues by adding fixes issue #.

How the change has been tested

Describe the tests that you ran to verify your changes.
Make sure to provide instructions for the maintainer as well as any relevant configurations.

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@daniel-mader daniel-mader added Chore Non-functional change, e.g., changing a config. Bug Something isn't working labels Feb 14, 2025
@daniel-mader daniel-mader changed the title ci: fix flaky test test: replace all example.com with example.test Feb 15, 2025
@daniel-mader daniel-mader changed the title test: replace all example.com with example.test test: use non-routable domain for testing (example.test) Feb 15, 2025
@daniel-mader daniel-mader changed the title test: use non-routable domain for testing (example.test) test: use reserved testing domain example.test (RFC 2606) Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Chore Non-functional change, e.g., changing a config.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant