From: Mukund Sivaraman Date: Tue, 7 Jan 2014 10:24:02 +0000 (+0530) Subject: [2226] Add unittest and lettuce test for qtype=RRSIG query X-Git-Tag: bind10-1.2.0beta1-release~76^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ebfb01d35b7571e8aaea6f1b96ef7336b94feb7;p=thirdparty%2Fkea.git [2226] Add unittest and lettuce test for qtype=RRSIG query --- diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc index f374a87384..193fb914ef 100644 --- a/src/bin/auth/tests/query_unittest.cc +++ b/src/bin/auth/tests/query_unittest.cc @@ -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. diff --git a/tests/lettuce/features/queries.feature b/tests/lettuce/features/queries.feature index 2db6c3e8de..b2750351e2 100644 --- a/tests/lettuce/features/queries.feature +++ b/tests/lettuce/features/queries.feature @@ -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