chenzhengzhang il y a 14 ans
Parent
commit
f9ceab26e3

+ 1 - 1
src/lib/datasrc/memory_datasrc.h

@@ -79,7 +79,7 @@ public:
     /// if it fails. It should not throw other types of exceptions.
     ///
     /// \param name The domain name to be searched for.
-    /// \param target  Insert RRs under the domain name into it.
+    /// \param target  Get all RRs under the domain name.
     /// \return A \c FindResult object enclosing the search result, it returns
     /// NULL in case of NXDOMAIN, NXRRSET and SUCCESS.
     FindResult findAny(const isc::dns::Name& name,

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

@@ -363,6 +363,8 @@ TEST_F(MemoryZoneTest, findAny) {
     RRsetList glue_child_rrsets;
     findAnyTest(child_glue_name_, Zone::SUCCESS, glue_child_rrsets,
                 true, ConstRRsetPtr());
+    EXPECT_EQ(rr_child_glue_, glue_child_rrsets.findRRset(RRType::A(),
+                                                     RRClass::IN()));
     EXPECT_EQ(1, glue_child_rrsets.size());
 
     // TODO: test NXRRSET case after rbtree non-terminal logic has