Browse Source

added a test case that uncovers a bug in DNAME-CNAME synthesize.
commented out for now, will open a ticket. so skipping review this time.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1727 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya 15 years ago
parent
commit
6705f66222

+ 14 - 0
src/lib/auth/tests/datasrc_unittest.cc

@@ -842,4 +842,18 @@ TEST_F(DataSrcTest, AddRemoveDataSrc) {
     ds.removeDataSrc(tsp);
     EXPECT_EQ(0, ds.dataSrcCount());
 }
+
+#if 0                           // currently fails
+TEST_F(DataSrcTest, synthesizedCnameTooLong) {
+    // qname has the possible max length (255 octets).  it matches a DNAME,
+    // and the synthesized CNAME would exceed the valid length.
+    createAndProcessQuery(
+        Name("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde."
+             "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde."
+             "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde."
+             "0123456789abcdef0123456789abcdef0123456789a.dname.example.org."),
+        RRClass::IN(), RRType::A());
+}
+#endif
+
 }

+ 1 - 0
src/lib/auth/tests/testdata/example.org

@@ -10,3 +10,4 @@ www.example.org. A 192.0.2.1
 mail.example.org. A 192.0.2.10
 sub.example.org. NS ns.sub.example.org.
 ns.sub.example.org. A 192.0.2.101
+dname.example.org. DNAME dname.example.info.

BIN
src/lib/auth/tests/testdata/example.org.sqlite3