Browse Source

[trac812] added a test case for the previous change to TSIGKey

JINMEI Tatuya 14 years ago
parent
commit
5cd716bd98
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/lib/dns/tests/tsigkey_unittest.cc

+ 5 - 0
src/lib/dns/tests/tsigkey_unittest.cc

@@ -58,6 +58,11 @@ TEST_F(TSIGKeyTest, construct) {
                       secret.c_str(),
                       secret.size()).getAlgorithmName().toText());
 
+    EXPECT_EQ("example.com.",
+              TSIGKey(Name("EXAMPLE.CoM."), TSIGKey::HMACSHA256_NAME(),
+                      secret.c_str(),
+                      secret.size()).getKeyName().toText());
+
     // Invalid combinations of secret and secret_len:
     EXPECT_THROW(TSIGKey(key_name, TSIGKey::HMACSHA1_NAME(), secret.c_str(), 0),
                  isc::InvalidParameter);