Fix issue 187: exit test (#188)
When not receiving a reply, exit the test and don't check the contents of the unreceived packet. Fixes #187
This commit is contained in:
parent
289f53d386
commit
b738d6e4e7
1 changed files with 1 additions and 0 deletions
|
@ -44,6 +44,7 @@ func TestLookupProxy(t *testing.T) {
|
||||||
resp, err := p.Lookup(state, "example.org.", dns.TypeA)
|
resp, err := p.Lookup(state, "example.org.", dns.TypeA)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error("Expected to receive reply, but didn't")
|
t.Error("Expected to receive reply, but didn't")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
// expect answer section with A record in it
|
// expect answer section with A record in it
|
||||||
if len(resp.Answer) == 0 {
|
if len(resp.Answer) == 0 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue