Browse Source

[2504] Check result of find()

Mukund Sivaraman 12 years ago
parent
commit
a6b558c0d0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/lib/datasrc/tests/memory/zone_finder_unittest.cc

+ 3 - 0
src/lib/datasrc/tests/memory/zone_finder_unittest.cc

@@ -1446,6 +1446,9 @@ TEST_F(InMemoryZoneFinderTest, NSECNonExistentTest) {
     ZoneFinderContextPtr find_result(
         result.zone_finder->find(search_name,
                                  RRType::A(), ZoneFinder::FIND_DNSSEC));
+    // We don't find the domain, but find() must complete (not throw or
+    // assert).
+    EXPECT_EQ(ZoneFinder::NXDOMAIN, find_result->code);
 }
 
 /// \brief NSEC3 specific tests fixture for the InMemoryZoneFinder class