-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
DNS: Move tests to integration tests, reenable skipped test #13510
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
Conversation
Test Results - Preflight, Unit22 979 tests - 22 21 137 ✅ - 21 6m 22s ⏱️ -1s Results for commit 8a2dabc. ± Comparison against base commit ca6b22b. This pull request removes 22 tests.♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro2 files 2 suites 35s ⏱️ Results for commit 8a2dabc. |
| dns_server.add_host("example.org", TargetRecord("127.0.0.1", RecordType.A)) | ||
| answer = query_dns("nonexistent.example.org", "A") | ||
| dns_server.add_host("example.com", TargetRecord("127.0.0.1", RecordType.A)) | ||
| answer = query_dns("nonexistent.example.com", "A") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually doesn't work for me. It's because nonexistent.example.com returns SERVFAIL rather than NXDOMAIN (although that might be temporary?)
Expected :<Rcode.NXDOMAIN: 3>
Actual :<Rcode.SERVFAIL: 2>
| These tests use the `example.org` and `example.com` domains for testing, and also tests the fallback to the public DNS | ||
| Changes in the upstream name resolution of those domains might lead to test failures. | ||
|
|
||
| TODO we should investigate creating our own test domain with a fixed behavior to avoid potential test failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is localstack.cloud something we could use? Unfortunately, creating an additional test domain would cost money, and the associated yearly management of keeping the domain alive.
Test Results (amd64) - Integration, Bootstrap 5 files ± 0 5 suites ±0 9m 21s ⏱️ - 2h 26m 6s Results for commit 8a2dabc. ± Comparison against base commit ca6b22b. This pull request removes 5495 and adds 22 tests. Note that renamed tests count towards both. |
simonrw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these tests are inherently fragile unless we implement our own domain name but the overhead of that at the moment is IMO more than handling these issues every ~year or so.
Motivation
Currently our DNS tests are marked as unit tests. However, they are not actually unit tests, as they test the end to end behavior of the DNS server, including calls to upstream DNS servers.
This PR will correctly move them to the integration tests. (cc @peter-smith-phd)
Also, recently it seems that
example.orgwas moved to cloudflare DNS, which leads to a different response code for one of our queries - NOERROR (with an empty response) instead of NXDOMAIN.By moving to
example.comfor this test we for now circumvent this issue - as a simple change in the assertion is not sufficient, since this change is still not propagated everywhere (and might even change in the future again).Changes
example.comdomain for skipped tests to reenable.Tests
Related
Fixes UNC-164