diff options
author | Sourabh Sourabh <sourabh.sourabh@est.tech> | 2024-08-16 10:59:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-08-16 10:59:38 +0000 |
commit | 81e399e6cb0cfdfe73d4e830796c1fc2259fa434 (patch) | |
tree | 16e0c32796e73200147a9573eff5d930727425cb /csit/tests/cps-data-operations | |
parent | 1aa2f5a69d7c691c7dce780c776e9ef02c5ca621 (diff) | |
parent | a4a559133591b5204ec0c16f61da9d45f139390d (diff) |
Merge "Rearrange CSIT test order"
Diffstat (limited to 'csit/tests/cps-data-operations')
-rw-r--r-- | csit/tests/cps-data-operations/cps-data-operations.robot | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/csit/tests/cps-data-operations/cps-data-operations.robot b/csit/tests/cps-data-operations/cps-data-operations.robot index 6ac2a952c3..96212ff632 100644 --- a/csit/tests/cps-data-operations/cps-data-operations.robot +++ b/csit/tests/cps-data-operations/cps-data-operations.robot @@ -26,6 +26,7 @@ Library OperatingSystem Library RequestsLibrary Library BuiltIn Library ConfluentKafkaLibrary +Library String Suite Setup Create Session CPS_URL http://${CPS_CORE_HOST}:${CPS_CORE_PORT} @@ -78,12 +79,20 @@ Is CM Handle READY [Arguments] ${uri} ${headers} ${cmHandle} ${response}= GET On Session CPS_URL ${uri} headers=${headers} Should Be Equal As Strings ${response.status_code} 200 + ${number_of_items}= Count Items In JSON Response ${response} + Should Be True ${number_of_items} > 0 FOR ${item} IN ${response.json()} IF "${item['cmHandle']}" == "${cmHandle}" Should Be Equal As Strings ${item['state']['cmHandleState']} READY END END +Count Items In JSON Response + [Arguments] ${response} + ${json_data}= Evaluate json.loads('${response.content.decode("utf-8")}') json + ${number_of_items}= Get Length ${json_data} + RETURN ${number_of_items} + Basic Teardown [Arguments] ${group_id} Unsubscribe ${group_id} |