Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate snooper tests to use new local DNS server (#20615)
* Update DNS tests to use a local DNS server Most of our DNS tests were hitting google DNS (8.8.8.8). This PR runs a singleton DNS server which responds with canned responses to domains used in our tests. The test server creates a 'dummy' interface on 10.10.10.10 and binds on TCP/UDP port 53. The server code is all in the testutil/testdns package. This should avoid any packet loss causing test flakiness. The one exception is TestTracerSuite/TestDNSStatsWithNAT which still uses NAT. I couldn't figure out how to get NAT working to a dummy interface. * Revert tim * Remove testing file * Fix imports? * Fixup imports * Fix linting * Fix golang-ci * Fix test tag * Fix license * Restore 8.8.8.8 in windows * Revert "Restore 8.8.8.8 in windows" This reverts commit cefcfa2. * Restore local * initial stab * fixed TestDNSNestedCNAME * fix TestDNSOverIPv6 * all snooper tests passing with new test server * use dummy server to get free port * local udp server to get random port * tcp + udp for non standard port * update tracer tests * added comment for linter * custom server for non-53, remove globals * updated local dns server to use global errors for each protocol * linter --------- Co-authored-by: Lee Avital <[email protected]>
- Loading branch information