Parcourir la source

Test data survive exception

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac451@4038 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner il y a 14 ans
Parent
commit
40d5e80dcf
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      src/lib/datasrc/tests/memory_datasrc_unittest.cc

+ 4 - 0
src/lib/datasrc/tests/memory_datasrc_unittest.cc

@@ -272,8 +272,12 @@ TEST_F(MemoryZoneTest, find) {
 }
 
 TEST_F(MemoryZoneTest, load) {
+    // Put some data inside the zone
+    EXPECT_NO_THROW(EXPECT_EQ(result::SUCCESS, zone_.add(rr_ns_)));
     // Loading with different origin should fail
     EXPECT_THROW(zone_.load(TEST_DATA_DIR "/root.zone"), MasterLoadError);
+    // See the original data is still there, survived the exception
+    findTest(origin_, RRType::NS(), Zone::SUCCESS, true, rr_ns_);
     // Create correct zone
     MemoryZone rootzone(class_, Name("."));
     // Try putting something inside