Browse Source

[2108] Add zone counter checks when empty zone file is loaded

Mukund Sivaraman 12 years ago
parent
commit
cc5d46563e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/lib/datasrc/memory/tests/memory_client_unittest.cc

+ 6 - 0
src/lib/datasrc/memory/tests/memory_client_unittest.cc

@@ -123,9 +123,15 @@ TEST_F(MemoryClientTest, loadEmptyZoneFileThrows) {
     // When an empty zone file is loaded, the origin doesn't even have
     // an SOA RR. This condition should be avoided, and hence load()
     // should throw when an empty zone is loaded.
+
+    EXPECT_EQ(0, client_->getZoneCount());
+
     EXPECT_THROW(client_->load(Name("."),
                                TEST_DATA_DIR "/empty.zone"),
                  InMemoryClient::EmptyZone);
+
+    EXPECT_EQ(0, client_->getZoneCount());
+
     // Teardown checks for memory segment leaks
 }