-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
migrate snooper tests to use new local DNS server #20615
Merged
Merged
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5ec2706
Update DNS tests to use a local DNS server
leeavital ada2b22
Revert tim
leeavital 6c4b9b4
Remove testing file
leeavital cab0ba6
Fix imports?
leeavital dd2397f
Fixup imports
leeavital c3dd670
Fix linting
leeavital e63fd20
Fix golang-ci
leeavital 6b317f6
Merge remote-tracking branch 'origin/main' into 8888_dns_server
leeavital 9f231d1
Fix test tag
leeavital a6f5c71
Fix license
leeavital cefcfa2
Restore 8.8.8.8 in windows
leeavital 0ec138b
Revert "Restore 8.8.8.8 in windows"
leeavital dc6b2af
Restore local
leeavital bc138d6
initial stab
akarpz 22b932f
fixed TestDNSNestedCNAME
akarpz 0fd0926
fix TestDNSOverIPv6
akarpz 92b3336
all snooper tests passing with new test server
akarpz 22c9f8d
use dummy server to get free port
akarpz b32d4aa
local udp server to get random port
akarpz 01d6bc8
tcp + udp for non standard port
akarpz 67c503f
update tracer tests
akarpz 5a95593
added comment for linter
akarpz 7c001b5
custom server for non-53, remove globals
akarpz 546ca01
updated local dns server to use global errors for each protocol
akarpz 58bb0e7
linter
akarpz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1175,6 +1175,7 @@ core,github.com/mdlayher/netlink/nlenc,MIT,Copyright (C) 2016-2022 Matt Layher | |
core,github.com/mdlayher/socket,MIT,Copyright (C) 2021 Matt Layher | ||
core,github.com/mholt/archiver/v3,MIT,Copyright (c) 2016 Matthew Holt | ||
core,github.com/microsoft/go-rustaudit,MIT,Copyright (c) Microsoft Corporation | ||
core,github.com/miekg/dns,BSD-3-Clause,"Alex A. Skinner | Alex Sergeyev | Andrew Tunnell-Jones | Ask Bjørn Hansen | Copyright (c) 2009, The Go Authors. Extensions copyright (c) 2011, Miek Gieben | Copyright 2009 The Go Authors. All rights reserved. Use of this source code | Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is | Copyright 2014 CloudFlare. All rights reserved. Use of this source code is | Dave Cheney | Dusty Wilson | James Hartig | Marek Majkowski | Miek Gieben <[email protected]> | Omri Bahumi | Peter van Dijk | copyright (c) 2011 Miek Gieben" | ||
core,github.com/mitchellh/copystructure,MIT,Copyright (c) 2014 Mitchell Hashimoto | ||
core,github.com/mitchellh/go-homedir,MIT,Copyright (c) 2013 Mitchell Hashimoto | ||
core,github.com/mitchellh/hashstructure/v2,MIT,Copyright (c) 2016 Mitchell Hashimoto | ||
|
@@ -1841,6 +1842,7 @@ core,golang.org/x/net/internal/socket,BSD-3-Clause,Copyright (c) 2009 The Go Aut | |
core,golang.org/x/net/internal/socks,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved | ||
core,golang.org/x/net/internal/timeseries,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved | ||
core,golang.org/x/net/ipv4,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved | ||
core,golang.org/x/net/ipv6,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved | ||
core,golang.org/x/net/proxy,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved | ||
core,golang.org/x/net/trace,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved | ||
core,golang.org/x/net/websocket,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For the cases where we need a random port, I think we should just spin up a server and shut it down in the test.
We can also pass in
0
for the port for the server spin up code to pick a port.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.
that is what we were doing before... I think the idea here was to centralize the server code. but I was on the fence when doing this, wdyt @leeavital
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 don't have strong feelings, if we prefer to have a server-per-test, I'm fine with it. My thinking was it was nice to have a single global test server because:
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 was only proposing a local server for this test where we don't use port 53. The other tests can use the global server. In addition, the server creation/run code seems to be using the same var,
globalServer
, for both servers, which is likely going to be brittle.