From edb83f87058e932fea87af5149f9b94798786f17 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 21 Apr 2024 08:12:09 -0400 Subject: Enable testifylint linter (#2044) * chore: Enable testifylint linter Signed-off-by: Dave Henderson * chore: fix flaky IP lookup test Signed-off-by: Dave Henderson --------- Signed-off-by: Dave Henderson --- net/net_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net') 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) { -- cgit v1.2.3