Browse Source

[2360] Test that RRset::toText() returns any associated RRSIG too

Mukund Sivaraman 12 years ago
parent
commit
42c8b84a3f
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/lib/dns/tests/rrset_unittest.cc

+ 8 - 0
src/lib/dns/tests/rrset_unittest.cc

@@ -359,4 +359,12 @@ TEST_F(RRsetRRSIGTest, getRRsigDataCount) {
     rrset_a->removeRRsig();
     rrset_a->removeRRsig();
     EXPECT_EQ(0, rrset_a->getRRsigDataCount());
     EXPECT_EQ(0, rrset_a->getRRsigDataCount());
 }
 }
+
+TEST_F(RRsetRRSIGTest, toText) {
+    // toText() should also return the associated RRSIG.
+    EXPECT_EQ("test.example.com. 3600 IN AAAA 2001:db8::1234\n"
+              "test.example.com. 3600 IN RRSIG AAAA 5 3 7200 "
+              "20100322084538 20100220084538 1 example.com. FAKEFAKEFAKEFAKE\n",
+              rrset_aaaa->toText());
+}
 }
 }