BIND 10 trac2522, updated. e08a21c3bdc637a447d68da727fa3f4cb6a26112 [2522] a couple more TSIG and SSHFP unit tests
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu May 23 13:37:37 UTC 2013
The branch, trac2522 has been updated
via e08a21c3bdc637a447d68da727fa3f4cb6a26112 (commit)
from 7e0b47d099a071d438c45e7cde177d89a0f3151e (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 e08a21c3bdc637a447d68da727fa3f4cb6a26112
Author: Paul Selkirk <pselkirk at isc.org>
Date: Thu May 23 09:36:26 2013 -0400
[2522] a couple more TSIG and SSHFP unit tests
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tests/rdata_sshfp_unittest.cc | 3 +++
src/lib/dns/tests/rdata_tsig_unittest.cc | 13 +++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/rdata_sshfp_unittest.cc b/src/lib/dns/tests/rdata_sshfp_unittest.cc
index c900367..7df24d5 100644
--- a/src/lib/dns/tests/rdata_sshfp_unittest.cc
+++ b/src/lib/dns/tests/rdata_sshfp_unittest.cc
@@ -155,6 +155,9 @@ TEST_F(Rdata_SSHFP_Test, badText) {
TEST_F(Rdata_SSHFP_Test, copy) {
const generic::SSHFP rdata_sshfp2(rdata_sshfp);
EXPECT_EQ(0, rdata_sshfp.compare(rdata_sshfp2));
+
+ const generic::SSHFP rdata_sshfp3 = rdata_sshfp;
+ EXPECT_EQ(0, rdata_sshfp.compare(rdata_sshfp3));
}
TEST_F(Rdata_SSHFP_Test, createFromWire) {
diff --git a/src/lib/dns/tests/rdata_tsig_unittest.cc b/src/lib/dns/tests/rdata_tsig_unittest.cc
index 8e91c14..d351b40 100644
--- a/src/lib/dns/tests/rdata_tsig_unittest.cc
+++ b/src/lib/dns/tests/rdata_tsig_unittest.cc
@@ -60,6 +60,11 @@ protected:
rdata_tsig(valid_text1)
{}
+ void checkFromText_None(const string& rdata_str) {
+ checkFromText<any::TSIG, isc::Exception, isc::Exception>(
+ rdata_str, rdata_tsig, false, false);
+ }
+
void checkFromText_InvalidText(const string& rdata_str) {
checkFromText<any::TSIG, InvalidRdataText, InvalidRdataText>(
rdata_str, rdata_tsig, true, true);
@@ -112,7 +117,7 @@ TEST_F(Rdata_TSIG_Test, fromText) {
EXPECT_EQ(0, rdata_tsig.getMACSize());
EXPECT_EQ(static_cast<void*>(NULL), rdata_tsig.getMAC());
EXPECT_EQ(16020, rdata_tsig.getOriginalID());
- EXPECT_EQ(17, rdata_tsig.getError()); // TODO: use constant
+ EXPECT_EQ(TSIGError::BAD_KEY_CODE, rdata_tsig.getError());
EXPECT_EQ(0, rdata_tsig.getOtherLen());
EXPECT_EQ(static_cast<void*>(NULL), rdata_tsig.getOtherData());
@@ -134,7 +139,11 @@ TEST_F(Rdata_TSIG_Test, fromText) {
any::TSIG tsig1("hmac-md5.sig-alg.reg.int 1286779327 300 "
"0 16020 BADKEY 0");
EXPECT_EQ(0, tsig1.compare(rdata_tsig));
-}
+
+ // multi-line rdata
+ checkFromText_None("hmac-md5.sig-alg.reg.int. ( 1286779327 300 \n"
+ "0 16020 BADKEY 0 )");
+};
TEST_F(Rdata_TSIG_Test, badText) {
// too many fields
More information about the bind10-changes
mailing list