check error in TestDNSCycleRecursorCheckAllFail before asserting response to stop panic in CI. (#20231)

pull/20232/head^2
John Murret 10 months ago committed by GitHub
parent cb384ac068
commit bc4da5f5d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -320,7 +320,8 @@ func TestDNSCycleRecursorCheckAllFail(t *testing.T) {
m.SetQuestion("google.com.", dns.TypeA) m.SetQuestion("google.com.", dns.TypeA)
// Agent request // Agent request
client := new(dns.Client) 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 // Verify if we hit SERVFAIL from Consul
require.Equal(t, dns.RcodeServerFailure, in.Rcode) require.Equal(t, dns.RcodeServerFailure, in.Rcode)
}) })

Loading…
Cancel
Save