]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2084] log checks for trailing commas for NETCONF
authorAndrei Pavel <andrei@isc.org>
Fri, 17 Dec 2021 14:22:33 +0000 (16:22 +0200)
committerAndrei Pavel <andrei@isc.org>
Fri, 17 Dec 2021 15:21:22 +0000 (17:21 +0200)
src/bin/agent/tests/parser_unittests.cc
src/bin/d2/tests/parser_unittest.cc
src/bin/dhcp4/tests/parser_unittest.cc
src/bin/netconf/tests/parser_unittests.cc

index a896549f9f40a1b3c5dfa5fbf9e7f289cac75869..3a0bab632fa09ebfa035f1537fe402313779c942 100644 (file)
@@ -865,7 +865,7 @@ public:
     ///
     /// @param loc Location of the trailing comma.
     void addLog(const string& loc) {
-      string log = "CTRL_AGENT_CONFIG_SYNTAX_WARNING Control Agent ";
+        string log = "CTRL_AGENT_CONFIG_SYNTAX_WARNING Control Agent ";
         log += "configuration syntax warning: " + loc;
         log += ": Extraneous comma. ";
         log += "A piece of configuration may have been omitted.";
index 5ad96bc66ddd629d0bac4ebad28e264ef85be52a..910051172a592a2014e795c26ab072c633dcea35 100644 (file)
@@ -815,7 +815,7 @@ public:
     ///
     /// @param loc Location of the trailing comma.
     void addLog(const string& loc) {
-      string log = "DHCP_DDNS_CONFIG_SYNTAX_WARNING DHCP-DDNS server ";
+        string log = "DHCP_DDNS_CONFIG_SYNTAX_WARNING DHCP-DDNS server ";
         log += "configuration syntax warning: " + loc;
         log += ": Extraneous comma. ";
         log += "A piece of configuration may have been omitted.";
index 03fa55d7ec01213c1146134922e5ca4ab206ec22..9252e56160590838c9a835d64502944a13f68276 100644 (file)
@@ -890,7 +890,7 @@ public:
         log += "A piece of configuration may have been omitted.";
         addString(log);
     }
-};      
+};
 
 // Test that trailing commas are allowed.
 TEST_F(TrailingCommasTest, tests) {
index da953a09b7e898b89248372d4e8804655998ee3b..b496470b007ee1579d6be51635a749bb17b1836e 100644 (file)
@@ -925,7 +925,7 @@ public:
     ///
     /// @param loc Location of the trailing comma.
     void addLog(const string& loc) {
-      string log = "NETCONF_CONFIG_SYNTAX_WARNING Netconf ";
+        string log = "NETCONF_CONFIG_SYNTAX_WARNING Netconf ";
         log += "configuration syntax warning: " + loc;
         log += ": Extraneous comma. ";
         log += "A piece of configuration may have been omitted.";
@@ -967,8 +967,15 @@ TEST_F(TrailingCommasTest, tests) {
 })");
     testParser(txt, ParserContext::PARSER_NETCONF, false);
 
-    addLog("<string>:7.16");
-    /// @todo
+    addLog("<string>:8.25");
+    addLog("<string>:9.8");
+    addLog("<string>:15.32");
+    addLog("<string>:17.36");
+    addLog("<string>:22.32");
+    addLog("<string>:24.36");
+    addLog("<string>:25.8");
+    addLog("<string>:28.29");
+    addLog("<string>:29.4");
     EXPECT_TRUE(checkFile());
 
     // Test with many consecutive commas.