BIND 10 trac1136, updated. 36adb24d97514efb97e5e5eedbbbb7e83ea5347d [1136] Add more tests from review
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Mar 9 02:26:25 UTC 2012
The branch, trac1136 has been updated
via 36adb24d97514efb97e5e5eedbbbb7e83ea5347d (commit)
via 1a5915abf8c066981b64bedaf325b43025d54f2a (commit)
via c3f5c79fcd6e1a1e843ad6e709a1a088b237d09d (commit)
from 8c4c34278c2a538d75cefa20e0f95bccf47e2ea2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 36adb24d97514efb97e5e5eedbbbb7e83ea5347d
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Mar 9 07:55:46 2012 +0530
[1136] Add more tests from review
Specifically:
* Test lowercase and uppercase
* Test with different spacing
commit 1a5915abf8c066981b64bedaf325b43025d54f2a
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Mar 9 07:51:44 2012 +0530
[1136] Remove message about the wire file being a generated one
commit c3f5c79fcd6e1a1e843ad6e709a1a088b237d09d
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Mar 9 07:49:20 2012 +0530
[1136] Rename non-generated wire data file
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tests/rdata_sshfp_unittest.cc | 16 +++++++++++++++-
src/lib/dns/tests/testdata/Makefile.am | 2 +-
...ta_sshfp_fromWire.wire => rdata_sshfp_fromWire} | 4 ----
src/lib/dns/tests/testdata/rdata_sshfp_fromWire2 | 4 ++++
4 files changed, 20 insertions(+), 6 deletions(-)
rename src/lib/dns/tests/testdata/{rdata_sshfp_fromWire.wire => rdata_sshfp_fromWire} (67%)
create mode 100644 src/lib/dns/tests/testdata/rdata_sshfp_fromWire2
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/rdata_sshfp_unittest.cc b/src/lib/dns/tests/rdata_sshfp_unittest.cc
index 5c6ba9a..dd133ce 100644
--- a/src/lib/dns/tests/rdata_sshfp_unittest.cc
+++ b/src/lib/dns/tests/rdata_sshfp_unittest.cc
@@ -43,8 +43,17 @@ const string sshfp_txt("2 1 123456789abcdef67890123456789abcdef67890");
const generic::SSHFP rdata_sshfp(2, 1, "123456789abcdef67890123456789abcdef67890");
TEST_F(Rdata_SSHFP_Test, createFromText) {
+ // Basic test
const generic::SSHFP rdata_sshfp2(sshfp_txt);
EXPECT_EQ(0, rdata_sshfp2.compare(rdata_sshfp));
+
+ // With different spacing
+ const generic::SSHFP rdata_sshfp3("2 1 123456789abcdef67890123456789abcdef67890");
+ EXPECT_EQ(0, rdata_sshfp3.compare(rdata_sshfp));
+
+ // Combination of lowercase and uppercase
+ const generic::SSHFP rdata_sshfp4("2 1 123456789ABCDEF67890123456789abcdef67890");
+ EXPECT_EQ(0, rdata_sshfp4.compare(rdata_sshfp));
}
TEST_F(Rdata_SSHFP_Test, badText) {
@@ -60,9 +69,14 @@ TEST_F(Rdata_SSHFP_Test, copy) {
}
TEST_F(Rdata_SSHFP_Test, createFromWire) {
+ // Basic test
+ EXPECT_EQ(0, rdata_sshfp.compare(
+ *rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
+ "rdata_sshfp_fromWire")));
+ // Combination of lowercase and uppercase
EXPECT_EQ(0, rdata_sshfp.compare(
*rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
- "rdata_sshfp_fromWire.wire")));
+ "rdata_sshfp_fromWire2")));
// TBD: more tests
}
diff --git a/src/lib/dns/tests/testdata/Makefile.am b/src/lib/dns/tests/testdata/Makefile.am
index d6fe415..32f93be 100644
--- a/src/lib/dns/tests/testdata/Makefile.am
+++ b/src/lib/dns/tests/testdata/Makefile.am
@@ -126,7 +126,7 @@ EXTRA_DIST += rdata_rp_fromWire1.spec rdata_rp_fromWire2.spec
EXTRA_DIST += rdata_rp_fromWire3.spec rdata_rp_fromWire4.spec
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.wire
+EXTRA_DIST += rdata_sshfp_fromWire
EXTRA_DIST += rdata_sshfp_fromWire1.spec rdata_sshfp_fromWire2.spec
EXTRA_DIST += rdata_afsdb_fromWire1.spec rdata_afsdb_fromWire2.spec
EXTRA_DIST += rdata_afsdb_fromWire3.spec rdata_afsdb_fromWire4.spec
diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire
new file mode 100644
index 0000000..added40
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire
@@ -0,0 +1,4 @@
+# SSHFP RDATA, RDLEN=22
+0016
+# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890
+02 01 123456789abcdef67890123456789abcdef67890
diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire.wire
deleted file mode 100644
index c7059e1..0000000
--- a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire.wire
+++ /dev/null
@@ -1,8 +0,0 @@
-###
-### This data file was auto-generated from rdata_sshfp_fromWire1.spec
-###
-
-# SSHFP RDATA, RDLEN=22
-0016
-# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890
-02 01 123456789abcdef67890123456789abcdef67890
diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2 b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2
new file mode 100644
index 0000000..a695548
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2
@@ -0,0 +1,4 @@
+# SSHFP RDATA, RDLEN=22
+0016
+# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789ABCDEF67890123456789abcdef67890
+02 01 123456789ABCDEF67890123456789abcdef67890
More information about the bind10-changes
mailing list