summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-04-21 08:12:09 -0400
committerGitHub <noreply@github.com>2024-04-21 08:12:09 -0400
commitedb83f87058e932fea87af5149f9b94798786f17 (patch)
tree10fede4cdcbfc47c160e02776397132d09303249 /net
parent8a1d0d3c80c1c62232f7294b5037ee3254dcbaf1 (diff)
Enable testifylint linter (#2044)
* chore: Enable testifylint linter Signed-off-by: Dave Henderson <dhenderson@gmail.com> * chore: fix flaky IP lookup test Signed-off-by: Dave Henderson <dhenderson@gmail.com> --------- Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/net_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/net_test.go b/net/net_test.go
index baae8c01..49f6db7d 100644
--- a/net/net_test.go
+++ b/net/net_test.go
@@ -16,12 +16,12 @@ func must(r interface{}, err error) interface{} {
func TestLookupIP(t *testing.T) {
assert.Equal(t, "127.0.0.1", must(LookupIP("localhost")))
- assert.Equal(t, "93.184.216.34", must(LookupIP("example.com")))
+ assert.Equal(t, "198.41.0.4", must(LookupIP("a.root-servers.net")))
}
func TestLookupIPs(t *testing.T) {
assert.Equal(t, []string{"127.0.0.1"}, must(LookupIPs("localhost")))
- assert.Equal(t, []string{"93.184.216.34"}, must(LookupIPs("example.com")))
+ assert.ElementsMatch(t, []string{"1.1.1.1", "1.0.0.1"}, must(LookupIPs("one.one.one.one")))
}
func BenchmarkLookupIPs(b *testing.B) {