BIND 10 trac2108_3, updated. f8b817744f6207f0aa8d997c7faf35b520383adc [2108] Test that adding an RRset to a non-existent zone throws

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Sep 5 13:51:30 UTC 2012


The branch, trac2108_3 has been updated
       via  f8b817744f6207f0aa8d997c7faf35b520383adc (commit)
      from  91ab8fe87a310dd610a38c8ff7813963baf5d576 (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 f8b817744f6207f0aa8d997c7faf35b520383adc
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Sep 5 19:21:15 2012 +0530

    [2108] Test that adding an RRset to a non-existent zone throws

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

Summary of changes:
 .../datasrc/memory/tests/memory_client_unittest.cc |    9 +++++++++
 1 file changed, 9 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
index 96ec85d..bf445a5 100644
--- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc
+++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
@@ -109,6 +109,15 @@ TEST_F(MemoryClientTest, getIteratorGetSOAThrowsNotImplemented) {
     EXPECT_THROW(iterator->getSOA(), isc::NotImplemented);
 }
 
+TEST_F(MemoryClientTest, addRRsetToNonExistentZoneThrows) {
+    // The zone "example.org" doesn't exist, so we can't add an RRset to
+    // it.
+    RRsetPtr rrset_a(new RRset(Name("example.org"), RRClass::IN(), RRType::A(),
+                               RRTTL(300)));
+    rrset_a->addRdata(rdata::in::A("192.0.2.1"));
+    EXPECT_THROW(client_->add(Name("example.org"), rrset_a), DataSourceError);
+}
+
 TEST_F(MemoryClientTest, getUpdaterThrowsNotImplemented) {
     // This method is not implemented.
     EXPECT_THROW(client_->getUpdater(Name("."), false, false),



More information about the bind10-changes mailing list