]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2226] Add unittest and lettuce test for qtype=RRSIG query
authorMukund Sivaraman <muks@isc.org>
Tue, 7 Jan 2014 10:24:02 +0000 (15:54 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 7 Jan 2014 10:44:22 +0000 (16:14 +0530)
src/bin/auth/tests/query_unittest.cc
tests/lettuce/features/queries.feature

index f374a8738455dfa759c72ab5ff58e6044b99fcdb..193fb914ef770d9aa66182846f08a14f5e916c1a 100644 (file)
@@ -1215,6 +1215,13 @@ TEST_P(QueryTest, exactMatchMultipleQueries) {
                   www_a_txt, zone_ns_txt, ns_addrs_txt);
 }
 
+TEST_P(QueryTest, qtypeIsRRSIG) {
+    // Directly querying for RRSIGs should result in rcode=REFUSED.
+    EXPECT_NO_THROW(query.process(*list_, qname, RRType::RRSIG(), response));
+    responseCheck(response, Rcode::REFUSED(), AA_FLAG, 0, 0, 0,
+                  "", "", "");
+}
+
 TEST_P(QueryTest, exactMatchIgnoreSIG) {
     // Check that we do not include the RRSIG when not requested even when
     // we receive it from the data source.
index 2db6c3e8dea1cfb89a696332d16977e02615ec71..b2750351e22c3b5c1f0e90e6df388cebfd8f3e52 100644 (file)
@@ -331,6 +331,28 @@ Feature: Querying feature
           | qryreferral       |          1 |
           | rcode.noerror     |          1 |
 
+    Scenario: RRSIG query
+        # Directly querying for RRSIGs should result in rcode=REFUSED.
+        Given I have bind10 running with configuration nsec3/nsec3_auth.config
+        And wait for bind10 stderr message BIND10_STARTED_CC
+        And wait for bind10 stderr message CMDCTL_STARTED
+        And wait for bind10 stderr message AUTH_SERVER_STARTED
+
+        bind10 module Auth should be running
+        And bind10 module Resolver should not be running
+        And bind10 module Xfrout should not be running
+        And bind10 module Zonemgr should not be running
+        And bind10 module Xfrin should not be running
+        And bind10 module Stats should not be running
+        And bind10 module StatsHttpd should not be running
+
+        A dnssec query for example. type RRSIG should have rcode REFUSED
+        The last query response should have flags qr aa
+        The last query response should have edns_flags do
+        The last query response should have ancount 0
+        The last query response should have nscount 0
+        The last query response should have adcount 1
+
     Scenario: SSHFP query
         # We are testing one more RR type for a normal successful case
         Given I have bind10 running with configuration example.org.inmem.config