agent: fix dns test

This commit is contained in:
Ryan Uber 2015-04-01 10:57:37 -07:00
parent c0178a84ce
commit deec3bef9e
1 changed files with 4 additions and 4 deletions

View File

@ -1192,7 +1192,7 @@ func TestDNS_ServiceLookup_CNAME(t *testing.T) {
t.Fatalf("err: %v", err) t.Fatalf("err: %v", err)
} }
if len(in.Answer) != 4 { if len(in.Answer) < 2 {
t.Fatalf("Bad: %#v", in) t.Fatalf("Bad: %#v", in)
} }
@ -1206,9 +1206,9 @@ func TestDNS_ServiceLookup_CNAME(t *testing.T) {
} }
// Check we recursively resolve // Check we recursively resolve
for i := 1; i < 4; i++ { for _, ans := range in.Answer[1:] {
if _, ok := in.Answer[i].(*dns.A); !ok { if _, ok := ans.(*dns.A); !ok {
t.Fatalf("Bad: %#v", in.Answer[i]) t.Fatalf("Bad: %#v", ans)
} }
} }
} }