]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2108] Add test for multiple RRSIGs for a single covered RRset
authorMukund Sivaraman <muks@isc.org>
Thu, 6 Sep 2012 04:35:05 +0000 (10:05 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 6 Sep 2012 04:35:05 +0000 (10:05 +0530)
src/lib/datasrc/memory/tests/memory_client_unittest.cc
src/lib/datasrc/memory/tests/testdata/Makefile.am
src/lib/datasrc/memory/tests/testdata/example.org-rrsigs.zone [new file with mode: 0644]

index cd4c4e891f63dd9473b825edb1c16cb45bfa6ff9..2625ef8d45aa16ee28081f652ed2e952bb4c1fce 100644 (file)
@@ -152,6 +152,11 @@ TEST_F(MemoryClientTest, loadRRSIGTypeUnmatched) {
     // Teardown checks for memory segment leaks
 }
 
+TEST_F(MemoryClientTest, loadRRSIGs) {
+    client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-rrsigs.zone");
+    EXPECT_EQ(1, client_->getZoneCount());
+}
+
 TEST_F(MemoryClientTest, getZoneCount) {
     EXPECT_EQ(0, client_->getZoneCount());
     client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-empty.zone");
index 829cd14b7584818b59e90ae633b50ef96cbd7ec3..2a551e86934fb4d2ed4d64621a217b2ef470e4cb 100644 (file)
@@ -7,3 +7,4 @@ EXTRA_DIST += example.org-broken2.zone
 EXTRA_DIST += example.org-rrsig-follows-nothing.zone
 EXTRA_DIST += example.org-rrsig-name-unmatched.zone
 EXTRA_DIST += example.org-rrsig-type-unmatched.zone
+EXTRA_DIST += example.org-rrsigs.zone
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-rrsigs.zone b/src/lib/datasrc/memory/tests/testdata/example.org-rrsigs.zone
new file mode 100644 (file)
index 0000000..594b453
--- /dev/null
@@ -0,0 +1,7 @@
+;; test zone file used for ZoneFinderContext tests.
+;; RRSIGs are (obviouslly) faked ones for testing.
+
+example.org. 3600 IN SOA       ns1.example.org. bugs.x.w.example.org. 74 3600 300 3600000 3600
+ns1.example.org.                     3600 IN A         192.168.0.1
+ns1.example.org.                     3600 IN RRSIG     A 7 3 3600 20150420235959 20051021000000 40430 example.org. FAKEFAKE
+ns1.example.org.                     3600 IN RRSIG     A 7 2 3600 20150420235959 20051021000000 40430 example.org. FAKEFAKE