Fiexes for DNS tests
This commit is contained in:
parent
91ca768b5c
commit
e036c191e9
@ -14,6 +14,7 @@ var server *dns.Server
|
|||||||
var records = []string{
|
var records = []string{
|
||||||
"auth.example.org. A 192.168.1.100",
|
"auth.example.org. A 192.168.1.100",
|
||||||
"ns1.auth.example.org. A 192.168.1.101",
|
"ns1.auth.example.org. A 192.168.1.101",
|
||||||
|
"!''b', unparseable ",
|
||||||
"ns2.auth.example.org. A 192.168.1.102",
|
"ns2.auth.example.org. A 192.168.1.102",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +90,11 @@ func TestResolveA(t *testing.T) {
|
|||||||
} else {
|
} else {
|
||||||
t.Error("No answer for DNS query")
|
t.Error("No answer for DNS query")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_, err = resolv.lookup("nonexistent.domain.tld", dns.TypeA)
|
||||||
|
if err == nil {
|
||||||
|
t.Errorf("Was expecting error because of NXDOMAIN but got none")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestResolveTXT(t *testing.T) {
|
func TestResolveTXT(t *testing.T) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user