From 89b6e0bedda6dd53d22af17360e55344ae51d136 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Thu, 8 Feb 2018 12:08:03 -0800 Subject: [PATCH] Add a test case for case insensitive/preserving with whoami plugin (#1509) This fix add a test case for case insensitive/preserving with whoami plugin. This fix is part of the effort for 1403. Signed-off-by: Yong Tang --- plugin/whoami/whoami_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin/whoami/whoami_test.go b/plugin/whoami/whoami_test.go index 0fee7d03f..02a6e1e6e 100644 --- a/plugin/whoami/whoami_test.go +++ b/plugin/whoami/whoami_test.go @@ -27,6 +27,14 @@ func TestWhoami(t *testing.T) { expectedReply: []string{"example.org.", "_udp.example.org."}, expectedErr: nil, }, + // Case insensitive and case preserving + { + qname: "Example.ORG", + qtype: dns.TypeA, + expectedCode: dns.RcodeSuccess, + expectedReply: []string{"Example.ORG.", "_udp.Example.ORG."}, + expectedErr: nil, + }, } ctx := context.TODO()