Commit 5e7af00c authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2124] Add some more wire data tests

parent 25e34715
......@@ -105,7 +105,27 @@ TEST_F(Rdata_SSHFP_Test, createFromWire) {
EXPECT_EQ(0, rdata_sshfp.compare(
*rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
"rdata_sshfp_fromWire2")));
// TBD: more tests
// algorithm=1, fingerprint=1
EXPECT_NO_THROW(rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
"rdata_sshfp_fromWire3.wire"));
// algorithm=255, fingerprint=1
EXPECT_NO_THROW(rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
"rdata_sshfp_fromWire4.wire"));
// algorithm=0, fingerprint=1
EXPECT_THROW(rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
"rdata_sshfp_fromWire5.wire"),
InvalidRdataText);
// algorithm=5, fingerprint=0
EXPECT_THROW(rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
"rdata_sshfp_fromWire6.wire"),
InvalidRdataText);
// algorithm=255, fingerprint=255
EXPECT_NO_THROW(rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
"rdata_sshfp_fromWire7.wire"));
}
TEST_F(Rdata_SSHFP_Test, toText) {
......
......@@ -79,6 +79,11 @@
/rdata_soa_toWireUncompressed.wire
/rdata_sshfp_fromWire1.wire
/rdata_sshfp_fromWire2.wire
/rdata_sshfp_fromWire3.wire
/rdata_sshfp_fromWire4.wire
/rdata_sshfp_fromWire5.wire
/rdata_sshfp_fromWire6.wire
/rdata_sshfp_fromWire7.wire
/rdata_tsig_fromWire1.wire
/rdata_tsig_fromWire2.wire
/rdata_tsig_fromWire3.wire
......
......@@ -45,6 +45,9 @@ BUILT_SOURCES += rdata_rp_fromWire3.wire rdata_rp_fromWire4.wire
BUILT_SOURCES += rdata_rp_fromWire5.wire rdata_rp_fromWire6.wire
BUILT_SOURCES += rdata_rp_toWire1.wire rdata_rp_toWire2.wire
BUILT_SOURCES += rdata_sshfp_fromWire1.wire rdata_sshfp_fromWire2.wire
BUILT_SOURCES += rdata_sshfp_fromWire3.wire rdata_sshfp_fromWire4.wire
BUILT_SOURCES += rdata_sshfp_fromWire5.wire rdata_sshfp_fromWire6.wire
BUILT_SOURCES += rdata_sshfp_fromWire7.wire
BUILT_SOURCES += rdata_afsdb_fromWire1.wire rdata_afsdb_fromWire2.wire
BUILT_SOURCES += rdata_afsdb_fromWire3.wire rdata_afsdb_fromWire4.wire
BUILT_SOURCES += rdata_afsdb_fromWire5.wire
......@@ -129,6 +132,9 @@ EXTRA_DIST += rdata_rp_fromWire5.spec rdata_rp_fromWire6.spec
EXTRA_DIST += rdata_rp_toWire1.spec rdata_rp_toWire2.spec
EXTRA_DIST += rdata_sshfp_fromWire rdata_sshfp_fromWire2
EXTRA_DIST += rdata_sshfp_fromWire1.spec rdata_sshfp_fromWire2.spec
EXTRA_DIST += rdata_sshfp_fromWire3.spec rdata_sshfp_fromWire4.spec
EXTRA_DIST += rdata_sshfp_fromWire5.spec rdata_sshfp_fromWire6.spec
EXTRA_DIST += rdata_sshfp_fromWire7.spec
EXTRA_DIST += rdata_afsdb_fromWire1.spec rdata_afsdb_fromWire2.spec
EXTRA_DIST += rdata_afsdb_fromWire3.spec rdata_afsdb_fromWire4.spec
EXTRA_DIST += rdata_afsdb_fromWire5.spec
......
#
# SSHFP RDATA
#
[custom]
sections: sshfp
[sshfp]
fingerprint: 123456789abcdef67890123456789abcdef67890
algorithm: 1
fingerprint_type: 1
#
# SSHFP RDATA
#
[custom]
sections: sshfp
[sshfp]
fingerprint: 123456789abcdef67890123456789abcdef67890
algorithm: 255
fingerprint_type: 1
#
# SSHFP RDATA
#
[custom]
sections: sshfp
[sshfp]
fingerprint: 123456789abcdef67890123456789abcdef67890
algorithm: 0
fingerprint_type: 1
#
# SSHFP RDATA
#
[custom]
sections: sshfp
[sshfp]
fingerprint: 123456789abcdef67890123456789abcdef67890
algorithm: 5
fingerprint_type: 0
#
# SSHFP RDATA
#
[custom]
sections: sshfp
[sshfp]
fingerprint: 123456789abcdef67890123456789abcdef67890
algorithm: 255
fingerprint_type: 255
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment