diff --git a/agent/dns_test.go b/agent/dns_test.go index 3998995272..8480beb62d 100644 --- a/agent/dns_test.go +++ b/agent/dns_test.go @@ -513,7 +513,8 @@ func TestDNSCycleRecursorCheckAllFail(t *testing.T) { m.SetQuestion("google.com.", dns.TypeA) // Agent request client := new(dns.Client) - in, _, _ := client.Exchange(m, agent.DNSAddr()) + in, _, err := client.Exchange(m, agent.DNSAddr()) + require.NoError(t, err) // Verify if we hit SERVFAIL from Consul require.Equal(t, dns.RcodeServerFailure, in.Rcode) }