|
@@ -36,8 +36,8 @@ class Rdata_CNAME_Test : public RdataTest {
|
|
|
// there's nothing to specialize
|
|
|
};
|
|
|
|
|
|
-const generic::CNAME rdata_cname("cn.example.com");
|
|
|
-const generic::CNAME rdata_cname2("cn2.example.com");
|
|
|
+const generic::CNAME rdata_cname("cn.example.com.");
|
|
|
+const generic::CNAME rdata_cname2("cn2.example.com.");
|
|
|
const uint8_t wiredata_cname[] = {
|
|
|
0x02, 0x63, 0x6e, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x03,
|
|
|
0x63, 0x6f, 0x6d, 0x00 };
|
|
@@ -50,16 +50,16 @@ const uint8_t wiredata_cname2[] = {
|
|
|
0x03, 0x63, 0x6e, 0x32, 0xc0, 0x03 };
|
|
|
|
|
|
TEST_F(Rdata_CNAME_Test, createFromText) {
|
|
|
- EXPECT_EQ(0, rdata_cname.compare(generic::CNAME("cn.example.com")));
|
|
|
+ EXPECT_EQ(0, rdata_cname.compare(generic::CNAME("cn.example.com.")));
|
|
|
// explicitly add a trailing dot. should be the same RDATA.
|
|
|
EXPECT_EQ(0, rdata_cname.compare(generic::CNAME("cn.example.com.")));
|
|
|
// should be case sensitive.
|
|
|
- EXPECT_EQ(0, rdata_cname.compare(generic::CNAME("CN.EXAMPLE.COM")));
|
|
|
+ EXPECT_EQ(0, rdata_cname.compare(generic::CNAME("CN.EXAMPLE.COM.")));
|
|
|
// RDATA of a class-independent type should be recognized for any
|
|
|
// "unknown" class.
|
|
|
EXPECT_EQ(0, rdata_cname.compare(*createRdata(RRType("CNAME"),
|
|
|
RRClass(65000),
|
|
|
- "cn.example.com")));
|
|
|
+ "cn.example.com.")));
|
|
|
}
|
|
|
|
|
|
TEST_F(Rdata_CNAME_Test, createFromWire) {
|
|
@@ -79,7 +79,7 @@ TEST_F(Rdata_CNAME_Test, createFromWire) {
|
|
|
"rdata_cname_fromWire", 71),
|
|
|
DNSMessageFORMERR);
|
|
|
|
|
|
- EXPECT_EQ(0, generic::CNAME("cn2.example.com").compare(
|
|
|
+ EXPECT_EQ(0, generic::CNAME("cn2.example.com.").compare(
|
|
|
*rdataFactoryFromFile(RRType("CNAME"), RRClass("IN"),
|
|
|
"rdata_cname_fromWire", 55)));
|
|
|
EXPECT_THROW(*rdataFactoryFromFile(RRType("CNAME"), RRClass("IN"),
|