mw/kubernetes: add reverse test case (#932)

Add a non-arpa testcase to the reverse test.
This commit is contained in:
Miek Gieben 2017-08-17 18:42:14 +01:00 committed by GitHub
parent 7f46df6d27
commit 5a1875120c

View file

@ -96,6 +96,13 @@ func TestReverse(t *testing.T) {
test.SOA("0.10.in-addr.arpa. 300 IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"),
},
},
{
Qname: "example.org.cluster.local.", Qtype: dns.TypePTR,
Rcode: dns.RcodeSuccess,
Ns: []dns.RR{
test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"),
},
},
}
ctx := context.TODO()
@ -109,9 +116,6 @@ func TestReverse(t *testing.T) {
t.Errorf("Test %d: expected no error, got %v", i, err)
return
}
if tc.Error != nil {
continue
}
resp := w.Msg
if resp == nil {