From: Mukund Sivaraman Date: Thu, 10 Jan 2013 13:40:36 +0000 (+0530) Subject: [2435] Test use of FIND_GLUE_OK option X-Git-Tag: bind10-1.0.0-rc-release~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=355fb4b538030ec31101edd4b8ea6e2ae2d90e65;p=thirdparty%2Fkea.git [2435] Test use of FIND_GLUE_OK option --- diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc index 134fda39ef..b4ad0bc5a3 100644 --- a/src/lib/datasrc/tests/database_unittest.cc +++ b/src/lib/datasrc/tests/database_unittest.cc @@ -4241,6 +4241,16 @@ TYPED_TEST(RRsetCollectionTest, find) { this->qclass_, RRType::A()); // Is this correct behavior? EXPECT_FALSE(rrset); + + // With the FIND_GLUE_OK passed to ZoneFinder's find(), + // "delegation.example.org." with type NS should return the NS + // record. Without FIND_GLUE_OK, ZoneFinder's find() would return + // DELEGATION and the find() below would return nothing. + rrset = this->collection->find(Name("delegation.example.org"), + this->qclass_, RRType::NS()); + ASSERT_TRUE(rrset); + EXPECT_EQ(RRType::NS(), rrset->getType()); + EXPECT_EQ(Name("delegation.example.org"), rrset->getName()); } TYPED_TEST(RRsetCollectionTest, iteratorTest) {