BIND 10 trac1577, updated. b407617f16ae9d672ef0e7812a8eb9e18509b6e6 [1577] Test findNSEC3 throws on non-NSEC3 zone

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Apr 11 08:46:53 UTC 2012


The branch, trac1577 has been updated
       via  b407617f16ae9d672ef0e7812a8eb9e18509b6e6 (commit)
      from  76f364b152f174c57982f294f97274a212684121 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b407617f16ae9d672ef0e7812a8eb9e18509b6e6
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Wed Apr 11 10:46:16 2012 +0200

    [1577] Test findNSEC3 throws on non-NSEC3 zone
    
    Just confirming it throws in case there's no NSEC3PARAM to compute the
    hash by.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/tests/database_unittest.cc |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc
index 93c170f..4820447 100644
--- a/src/lib/datasrc/tests/database_unittest.cc
+++ b/src/lib/datasrc/tests/database_unittest.cc
@@ -3575,8 +3575,6 @@ TEST_F(MockDatabaseClientTest, journalWithBadData) {
 TEST_F(MockDatabaseClientTest, findNSEC3) {
     // Set up the faked hash calculator.
     setNSEC3HashCreator(&test_nsec3_hash_creator_);
-    // And enable NSEC3 in the zone.
-    this->current_accessor_->enableNSEC3();
 
     DataSourceClient::FindResult
         zone(this->client_->findZone(Name("example.org")));
@@ -3584,6 +3582,12 @@ TEST_F(MockDatabaseClientTest, findNSEC3) {
     boost::shared_ptr<DatabaseClient::Finder> finder(
         dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
 
+    // It'll complain if there is no NSEC3PARAM yet
+    EXPECT_THROW(finder->findNSEC3(Name("example.org"), false),
+                 DataSourceError);
+    // And enable NSEC3 in the zone.
+    this->current_accessor_->enableNSEC3();
+
     // Parameter validation: the query name must be in or below the zone
     EXPECT_THROW(finder->findNSEC3(Name("example.com"), false), OutOfZone);
     EXPECT_THROW(finder->findNSEC3(Name("org"), true), OutOfZone);



More information about the bind10-changes mailing list