From a679498904a817011b55c58ee579e55f27fa0bc8 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Mon, 1 Jun 2020 10:42:16 +0300 Subject: [PATCH] test: check question --- dnsforward/dnsforward_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dnsforward/dnsforward_test.go b/dnsforward/dnsforward_test.go index cece5682226..420182655ac 100644 --- a/dnsforward/dnsforward_test.go +++ b/dnsforward/dnsforward_test.go @@ -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)