From: Lorand Jakab Date: Tue, 19 Sep 2017 09:11:12 +0000 (+0300) Subject: Convert Sleep to WUKS in lispflowmapping CSIT X-Git-Tag: release/nitrogen~7 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=5cbb1081a20b6bd7573b2ba5e675ddad6075b84f;p=integration%2Ftest.git Convert Sleep to WUKS in lispflowmapping CSIT Part 2, 020_RPC_CRUD.robot Change-Id: Ibdce362fbb6e87e0221878832be57474717e59e9 Signed-off-by: Lorand Jakab --- diff --git a/csit/libraries/LISPFlowMapping.robot b/csit/libraries/LISPFlowMapping.robot index 9dad54ef0f..e1efb78d47 100644 --- a/csit/libraries/LISPFlowMapping.robot +++ b/csit/libraries/LISPFlowMapping.robot @@ -52,6 +52,10 @@ Get Elp Hop ${hop}= Get From List ${exp_loc_path} ${actual_hop_index} [Return] ${hop} +Check Key Removal + [Arguments] ${json} + Post Log Check ${LFM_RPC_API}:get-key ${json} 404 + Check Mapping Removal [Arguments] ${json} Post Log Check ${LFM_RPC_API}:get-mapping ${json} 404 @@ -65,3 +69,22 @@ Get Mapping JSON ${mapping_record_json}= Get MappingRecord JSON ${lisp_address} ${loc_record_list} ${mapping}= Wrap input ${mapping_record_json} [Return] ${mapping} + +Post Log Check Authkey + [Arguments] ${json} ${password} + [Documentation] Extend the 'Post Log Check' keyword to check for the correct authentication key + ${resp}= Post Log Check ${LFM_RPC_API}:get-key ${json} + Authentication Key Should Be ${resp} ${password} + +Post Log Check Ipv4 Rloc + [Arguments] ${json} ${rloc} + [Documentation] Extend the 'Post Log Check' keyword to check for the correct IPv4 RLOC + ${resp}= Post Log Check ${LFM_RPC_API}:get-mapping ${json} + Ipv4 Rloc Should Be ${resp} ${rloc} + +Post Log Check LocatorRecord + [Arguments] ${json} + [Documentation] Extend the 'Post Log Check' keyword to check for the existence of a LocatorRecord + ${resp}= Post Log Check ${LFM_RPC_API}:get-mapping ${json} + ${eid_record}= Get Eid Record ${resp} + Dictionary Should Contain Key ${eid_record} LocatorRecord diff --git a/csit/suites/lispflowmapping/msmr/020_RPC_CRUD.robot b/csit/suites/lispflowmapping/msmr/020_RPC_CRUD.robot index 9773f89936..aec37c7359 100644 --- a/csit/suites/lispflowmapping/msmr/020_RPC_CRUD.robot +++ b/csit/suites/lispflowmapping/msmr/020_RPC_CRUD.robot @@ -26,11 +26,8 @@ Attempt To Read Non-Existing Key Read Key [Documentation] Read an existing key for an IPv4 EID - # TODO: Test to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay ${get_key}= Get LispAddress JSON And Wrap input ipv4:192.0.2.1/32 - ${resp}= Post Log Check ${LFM_RPC_API}:get-key ${get_key} - Authentication Key Should Be ${resp} password + Wait Until Keyword Succeeds 5s 200ms Post Log Check Authkey ${get_key} password Update Key [Documentation] Update an existing key for an IPv4 EID @@ -41,11 +38,8 @@ Update Key Read Updated Key [Documentation] Read the key updated in the previous test - # TODO: Test to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay ${get_key}= Get LispAddress JSON And Wrap input ipv4:192.0.2.1/32 - ${resp}= Post Log Check ${LFM_RPC_API}:get-key ${get_key} - Authentication Key Should Be ${resp} updated-password + Wait Until Keyword Succeeds 5s 200ms Post Log Check Authkey ${get_key} updated-password Delete Key [Documentation] Delete an existing key for an IPv4 EID @@ -54,10 +48,8 @@ Delete Key Attempt To Read Deleted Key [Documentation] Try to read the key deleted in the previous test - # TODO: Test to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay ${get_key}= Get LispAddress JSON And Wrap input ipv4:192.0.2.1/32 - Post Log Check ${LFM_RPC_API}:get-key ${get_key} 404 + Wait Until Keyword Succeeds 5s 200ms Check Key Removal ${get_key} Attempt To Update Non-Existing Key [Documentation] Update a non-existing key for an IPv4 EID @@ -78,11 +70,8 @@ Attempt To Read Non-Existing Mapping Read Mapping [Documentation] Read an existing mapping for an IPv4 EID - # TODO: Test to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay ${get_mapping}= Get LispAddress JSON And Wrap input ipv4:192.0.2.1/32 - ${resp}= Post Log Check ${LFM_RPC_API}:get-mapping ${get_mapping} - Ipv4 Rloc Should Be ${resp} 10.10.10.10 + Wait Until Keyword Succeeds 5s 200ms Post Log Check Ipv4 Rloc ${get_mapping} 10.10.10.10 Update Mapping [Documentation] Update an existing mapping for an IPv4 EID @@ -91,11 +80,8 @@ Update Mapping Read Updated Mapping [Documentation] Read the mapping updated in the previous test - # TODO: Test to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay ${get_mapping}= Get LispAddress JSON And Wrap input ipv4:192.0.2.1/32 - ${resp}= Post Log Check ${LFM_RPC_API}:get-mapping ${get_mapping} - Ipv4 Rloc Should Be ${resp} 20.20.20.20 + Wait Until Keyword Succeeds 5s 200ms Post Log Check Ipv4 Rloc ${get_mapping} 20.20.20.20 Delete Mapping [Documentation] Delete an existing mapping for an IPv4 EID @@ -104,7 +90,5 @@ Delete Mapping Attempt To Read Deleted Mapping [Documentation] Try to read the mapping deleted in the previous test - # TODO: Test to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay ${get_mapping}= Get LispAddress JSON And Wrap input ipv4:192.0.2.1/32 - Check Mapping Removal ${get_mapping} + Wait Until Keyword Succeeds 5s 200ms Check Mapping Removal ${get_mapping} diff --git a/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot b/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot index 4d02bbfca0..d6d956386e 100644 --- a/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot +++ b/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot @@ -74,10 +74,3 @@ Remove Datatype And Check Removal Post Log Check ${LFM_RPC_API}:remove-mapping ${RPC_Datatype__current_json} Wait Until Keyword Succeeds 5s 200ms Check Mapping Removal ${RPC_Datatype__current_json} Set Suite Variable ${RPC_Datatype__current_json} ${EMPTY} - -Post Log Check LocatorRecord - [Arguments] ${get_mapping} - [Documentation] Extend the 'Post Log Check' keyword to check for the existence of a LocatorRecord - ${resp}= Post Log Check ${LFM_RPC_API}:get-mapping ${get_mapping} - ${eid_record}= Get Eid Record ${resp} - Dictionary Should Contain Key ${eid_record} LocatorRecord