Browse Source

[2108] Add test for multiple RRSIGs for a single covered RRset

Mukund Sivaraman 12 years ago
parent
commit
105b19f75e

+ 5 - 0
src/lib/datasrc/memory/tests/memory_client_unittest.cc

@@ -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");

+ 1 - 0
src/lib/datasrc/memory/tests/testdata/Makefile.am

@@ -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

+ 7 - 0
src/lib/datasrc/memory/tests/testdata/example.org-rrsigs.zone

@@ -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