${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
${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
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
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
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
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
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
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}