]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2534] Update CAA unittest to match change in string token scanning behavior
authorMukund Sivaraman <muks@isc.org>
Thu, 20 Feb 2014 03:08:09 +0000 (08:38 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 20 Feb 2014 03:12:24 +0000 (08:42 +0530)
src/lib/dns/tests/rdata_caa_unittest.cc

index b88aba31e70704cd2ec13860b838055a2955d237..8000005d16ac829909209dea1560a70128927375 100644 (file)
@@ -127,9 +127,10 @@ TEST_F(Rdata_CAA_Test, fields) {
     EXPECT_THROW(const generic::CAA rdata_caa2("256 issue \"ca.example.net\""),
                  InvalidRdataText);
 
-    // Missing tag actually passes because it parses the value as tag
-    // and assumes that the value is empty instead.
-    EXPECT_NO_THROW(const generic::CAA rdata_caa2("0 \"ca.example.net\""));
+    // Missing tag causes the value to be parsed as the tag field. As
+    // the tag field does not allow quoted strings, this throws.
+    EXPECT_THROW(const generic::CAA rdata_caa2("0 \"ca.example.net\""),
+                 InvalidRdataText);
 
     // Tag is too long
     const std::string tag(256, 'a');