2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 14:35:29 +00:00

[#1349] addressed comments

This commit is contained in:
Razvan Becheriu
2020-07-29 20:29:04 +03:00
parent acfe559032
commit d76622ef19
2 changed files with 9 additions and 9 deletions

View File

@@ -333,7 +333,7 @@ Lease6Parser::parse(ConstSrvConfigPtr& cfg,
if ((state == Lease::STATE_DECLINED) && (type == Lease::TYPE_PD)) { if ((state == Lease::STATE_DECLINED) && (type == Lease::TYPE_PD)) {
isc_throw(isc::InvalidOperation, isc_throw(isc::InvalidOperation,
"Invalid PD prefix in declined state."); "Invalid declined state for PD prefix.");
} }
// Handle user context. // Handle user context.
@@ -379,5 +379,5 @@ Lease6Parser::parse(ConstSrvConfigPtr& cfg,
return (l); return (l);
} }
}; } // end of namespace lease_cmds
}; } // end of namespace isc

View File

@@ -1282,7 +1282,7 @@ TEST_F(LeaseCmdsTest, Lease6AddBadParams) {
"2001:db8:1::1"; "2001:db8:1::1";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp); testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
// Invalid PD prefix in declined state. // Invalid declined state for PD prefix.
txt = txt =
"{\n" "{\n"
" \"command\": \"lease6-add\",\n" " \"command\": \"lease6-add\",\n"
@@ -1296,7 +1296,7 @@ TEST_F(LeaseCmdsTest, Lease6AddBadParams) {
" \"state\": 1" " \"state\": 1"
" }\n" " }\n"
"}"; "}";
exp_rsp = "Invalid PD prefix in declined state."; exp_rsp = "Invalid declined state for PD prefix.";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp); testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
} }
@@ -3676,7 +3676,7 @@ TEST_F(LeaseCmdsTest, Lease6UpdateBadParams) {
"'{ \"comment\": \"in user context\" }'"; "'{ \"comment\": \"in user context\" }'";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp); testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
// Invalid PD prefix in declined state. // Invalid declined state for PD prefix.
txt = txt =
"{\n" "{\n"
" \"command\": \"lease6-update\",\n" " \"command\": \"lease6-update\",\n"
@@ -3690,7 +3690,7 @@ TEST_F(LeaseCmdsTest, Lease6UpdateBadParams) {
" \"state\": 1" " \"state\": 1"
" }\n" " }\n"
"}"; "}";
exp_rsp = "Invalid PD prefix in declined state."; exp_rsp = "Invalid declined state for PD prefix.";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp); 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); testCommand(cmd, CONTROL_RESULT_ERROR, exp_rsp);
// Check that the lease was not inserted. // 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); testCommand(cmd, CONTROL_RESULT_ERROR, exp_rsp);
// Check that the lease we inserted is stored. // Check that the lease we inserted is stored.