]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1571] added a couple of new tests to confirm additional cases regarding DS.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 25 Jan 2012 08:39:58 +0000 (00:39 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 25 Jan 2012 08:39:58 +0000 (00:39 -0800)
(they should have succeeded in the original version of implementation)

src/lib/datasrc/tests/memory_datasrc_unittest.cc

index 54670595bc67a3a6eea14b22cd1ccc4787564255..2fdc4521e476464ae5550411180b6472ad4c7bab 100644 (file)
@@ -666,8 +666,17 @@ TEST_F(InMemoryZoneFinderTest, delegationWithDS) {
     EXPECT_EQ(SUCCESS, zone_finder_.add(rr_child_ns_));
     EXPECT_EQ(SUCCESS, zone_finder_.add(rr_child_ds_));
 
+    // Normal types of query should result in delegation, but DS query
+    // should be considered in-zone.
+    findTest(Name("child.example.org"), RRType::A(), ZoneFinder::DELEGATION,
+             true, rr_child_ns_);
     findTest(Name("child.example.org"), RRType::DS(), ZoneFinder::SUCCESS,
              true, rr_child_ds_);
+
+    // There's nothing special for DS query at the zone apex.  It would
+    // normally result in NXRRSET.
+    findTest(Name("example.org"), RRType::DS(), ZoneFinder::NXRRSET,
+             true, ConstRRsetPtr());
 }
 
 TEST_F(InMemoryZoneFinderTest, findAny) {