]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1349] addressed comments
authorRazvan Becheriu <razvan@isc.org>
Wed, 29 Jul 2020 17:29:04 +0000 (20:29 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 3 Aug 2020 11:40:20 +0000 (11:40 +0000)
src/hooks/dhcp/lease_cmds/lease_parser.cc
src/hooks/dhcp/lease_cmds/tests/lease_cmds_unittest.cc

index 40bad71216f1f1ca54dfbc5ac9570c6408b6b0a6..c8048c6ea6c8aa0abc39abff5607d04eeceb6814 100644 (file)
@@ -333,7 +333,7 @@ Lease6Parser::parse(ConstSrvConfigPtr& cfg,
 
     if ((state == Lease::STATE_DECLINED) && (type == Lease::TYPE_PD)) {
         isc_throw(isc::InvalidOperation,
-                  "Invalid PD prefix in declined state.");
+                  "Invalid declined state for PD prefix.");
     }
 
     // Handle user context.
@@ -379,5 +379,5 @@ Lease6Parser::parse(ConstSrvConfigPtr& cfg,
     return (l);
 }
 
-};
-};
+} // end of namespace lease_cmds
+} // end of namespace isc
index 0f5f280cc4a19c7e6a5d12a5942691460f843ffd..e321d8b786e0b230a397e540ff4c6f692bc82b14 100644 (file)
@@ -1282,7 +1282,7 @@ TEST_F(LeaseCmdsTest, Lease6AddBadParams) {
         "2001:db8:1::1";
     testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
 
-    // Invalid PD prefix in declined state.
+    // Invalid declined state for PD prefix.
     txt =
         "{\n"
         "    \"command\": \"lease6-add\",\n"
@@ -1296,7 +1296,7 @@ TEST_F(LeaseCmdsTest, Lease6AddBadParams) {
         "        \"state\": 1"
         "    }\n"
         "}";
-    exp_rsp = "Invalid PD prefix in declined state.";
+    exp_rsp = "Invalid declined state for PD prefix.";
     testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
 }
 
@@ -3676,7 +3676,7 @@ TEST_F(LeaseCmdsTest, Lease6UpdateBadParams) {
         "'{ \"comment\": \"in user context\" }'";
     testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
 
-    // Invalid PD prefix in declined state.
+    // Invalid declined state for PD prefix.
     txt =
         "{\n"
         "    \"command\": \"lease6-update\",\n"
@@ -3690,7 +3690,7 @@ TEST_F(LeaseCmdsTest, Lease6UpdateBadParams) {
         "        \"state\": 1"
         "    }\n"
         "}";
-    exp_rsp = "Invalid PD prefix in declined state.";
+    exp_rsp = "Invalid declined state for PD prefix.";
     testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
 }
 
@@ -4713,7 +4713,7 @@ TEST_F(LeaseCmdsTest, Lease6BulkApplyAddsOnlyBadParam) {
         "        ]"
         "    }"
         "}";
-    string exp_rsp = "Invalid PD prefix in declined state.";
+    string exp_rsp = "Invalid declined state for PD prefix.";
     testCommand(cmd, CONTROL_RESULT_ERROR, exp_rsp);
 
     // Check that the lease was not inserted.
@@ -4791,7 +4791,7 @@ TEST_F(LeaseCmdsTest, Lease6BulkApplyUpdatesOnlyBadParam) {
         "        ]"
         "    }"
         "}";
-    string exp_rsp = "Invalid PD prefix in declined state.";
+    string exp_rsp = "Invalid declined state for PD prefix.";
     testCommand(cmd, CONTROL_RESULT_ERROR, exp_rsp);
 
     // Check that the lease we inserted is stored.