BIND 10 trac1579, updated. 8e4c96040527d952da60338f7cf061f976780543 [1579] update unit test. In this unit test, I update NSEC3PARAM type RR data to database, and it works smoothly.

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Mar 19 05:13:53 UTC 2012


The branch, trac1579 has been updated
       via  8e4c96040527d952da60338f7cf061f976780543 (commit)
      from  0b1b0da6ffc60991c0ccad85695631dec02db4da (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 8e4c96040527d952da60338f7cf061f976780543
Author: haikuo zhang <zhanghaikuo at cnnic.cn>
Date:   Mon Mar 19 13:08:04 2012 +0800

    [1579] update unit test. In this unit test, I update NSEC3PARAM
    type RR data to database,and it works smoothly.

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

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

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc
index 758095b..3c878c2 100644
--- a/src/lib/datasrc/tests/database_unittest.cc
+++ b/src/lib/datasrc/tests/database_unittest.cc
@@ -2281,6 +2281,31 @@ TYPED_TEST(DatabaseClientTest, wildcardNXRRSET_NSEC) {
                Name("*.wild.example.org"), ZoneFinder::FIND_DNSSEC);
 }
 
+TYPED_TEST(DatabaseClientTest,dbNegativeCaseFind){
+    //ZoneFinder::find() for negative case should show whether the zone is 
+    //signed by NSEC or NSEC3,that is good for upper layer caller.
+
+    //First off, add an NSEC3PARAM RR
+    this->updater_ = this->client_->getUpdater(this->zname_, false);
+    this->rrset_.reset(new RRset(this->zname_, this->qclass_,
+                                isc::dns::RRType::NSEC3PARAM(),
+                                this->rrttl_));
+    this->rrset_->addRdata(rdata::createRdata(this->rrset_->getType(),
+                                              this->rrset_->getClass(),
+                                              "1 0 12 aabbccdd"));
+    this->updater_->addRRset(*this->rrset_);
+    this->expected_rdatas_.clear();
+    this->expected_sig_rdatas_.clear();
+    //If there is a NSEC3PARM RRset, the result of find() function should
+    //contain RESULT_NSEC3_SIGNED flag when NXDOMAIN or NXRRSET.
+    doFindTest(this->updater_->getFinder(),
+               isc::dns::Name("doesnotexist.example.org."),
+               this->qtype_, this->qtype_, this->rrttl_,
+               ZoneFinder::NXDOMAIN,this->expected_rdatas_, 
+               this->expected_sig_rdatas_,
+               ZoneFinder::RESULT_NSEC3_SIGNED);
+}
+
 TYPED_TEST(DatabaseClientTest, NXDOMAIN_NSEC) {
     // The domain doesn't exist, so we must get the right NSEC
     boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());



More information about the bind10-changes mailing list