Skip to content

Commit

Permalink
test: check question
Browse files Browse the repository at this point in the history
  • Loading branch information
szolin committed Jun 1, 2020
1 parent 7491e75 commit a679498
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dnsforward/dnsforward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ func TestRewrite(t *testing.T) {
req = createTestMessageWithType("my.alias.example.org.", dns.TypeA)
reply, err = dns.Exchange(req, addr.String())
assert.Nil(t, err)
assert.Equal(t, "my.alias.example.org.", reply.Question[0].Name) // the original question is restored
assert.Equal(t, 2, len(reply.Answer))
assert.Equal(t, "example.org.", reply.Answer[0].(*dns.CNAME).Target)
assert.Equal(t, dns.TypeA, reply.Answer[1].Header().Rrtype)
Expand Down

0 comments on commit a679498

Please sign in to comment.