Add Exchange in the test.

Increases test coverage.
This commit is contained in:
Miek Gieben 2014-08-30 15:06:20 +01:00
parent 10dc4b971d
commit 85189d35e4
1 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,17 @@ func TestClientSync(t *testing.T) {
t.Fail()
t.Logf("%v\n", r)
}
// And now with plain Exchange().
r, e = Exchange(m, addrstr)
if e != nil {
t.Logf("failed to exchange: %s", e.Error())
t.Fail()
}
if r != nil && r.Rcode != RcodeSuccess {
t.Log("failed to get an valid answer")
t.Fail()
t.Logf("%v\n", r)
}
}
func TestClientEDNS0(t *testing.T) {