diff --git a/profile/endpoints/endpoints_test.go b/profile/endpoints/endpoints_test.go index 9b28e131..437efc1b 100644 --- a/profile/endpoints/endpoints_test.go +++ b/profile/endpoints/endpoints_test.go @@ -379,12 +379,11 @@ func TestEndpointMatching(t *testing.T) { t.Fatal(err) } - testEndpointMatch(t, ep, (&intel.Entity{ - IP: net.ParseIP("192.168.0.1"), - }).Init(), Permitted) - testEndpointMatch(t, ep, (&intel.Entity{ - IP: net.ParseIP("151.101.1.164"), // nytimes.com - }).Init(), NoMatch) + entity = &intel.Entity{} + entity.SetIP(net.ParseIP("192.168.0.1")) + testEndpointMatch(t, ep, entity, Permitted) + entity.SetIP(net.ParseIP("151.101.1.164")) // nytimes.com + testEndpointMatch(t, ep, entity, NoMatch) // Lists diff --git a/resolver/namerecord_test.go b/resolver/namerecord_test.go index f0e21a37..8149fa64 100644 --- a/resolver/namerecord_test.go +++ b/resolver/namerecord_test.go @@ -9,6 +9,9 @@ func TestNameRecordStorage(t *testing.T) { testNameRecord := &NameRecord{ Domain: testDomain, Question: testQuestion, + Resolver: &ResolverInfo{ + Type: "dns", + }, } err := testNameRecord.Save() diff --git a/resolver/reverse_test.go b/resolver/reverse_test.go index e162e823..b7426b9e 100644 --- a/resolver/reverse_test.go +++ b/resolver/reverse_test.go @@ -33,5 +33,5 @@ func TestResolveIPAndValidate(t *testing.T) { testReverse(t, "2606:4700:4700::1111", "one.one.one.one.", "") testReverse(t, "93.184.216.34", "example.com.", "record could not be found: 34.216.184.93.in-addr.arpa.PTR") - testReverse(t, "185.199.109.153", "sites.github.io.", "record could not be found: 153.109.199.185.in-addr.arpa.PTR") + testReverse(t, "185.199.109.153", "cdn-185-199-109-153.github.com.", "record could not be found: 153.109.199.185.in-addr.arpa.PTR") } diff --git a/resolver/rrcache_test.go b/resolver/rrcache_test.go index 8aaa3094..0d9c8413 100644 --- a/resolver/rrcache_test.go +++ b/resolver/rrcache_test.go @@ -13,6 +13,9 @@ func TestCaching(t *testing.T) { testNameRecord := &NameRecord{ Domain: testDomain, Question: testQuestion, + Resolver: &ResolverInfo{ + Type: "dns", + }, } err := testNameRecord.Save()