aboutsummaryrefslogtreecommitdiffstats
path: root/csit
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2024-10-24 17:11:57 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2024-10-25 15:39:13 +0100
commit873480b2a8f99825353582e9d0d3beae6a5ecbde (patch)
tree792c146333bb9d57f9203acfb66a170add84c570 /csit
parent2664c776fda2431846447c40aaad98b49da5593a (diff)
Fix failing CSIT and add unit test proving the bug
It was determined that one CSIT is intermittently failing due to a CM-handle being deleted while module sync is in progress, which causes the whole batch operation to fail. Even CM-handles that did sync will not go into READY state, despite the logs saying otherwise. This commit reproduces the issue in a unit test, and prevents the issue in the CSIT by changing test order. Also, errors during module sync tasks are reported at ERROR level. (The actual bug fix will be addressed in another patch.) Issue-ID: CPS-2474 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7e0d617cbd48d8fd1fad036079fbd876ee21d8a8
Diffstat (limited to 'csit')
-rw-r--r--csit/tests/cps-model-sync/cps-model-sync.robot24
1 files changed, 12 insertions, 12 deletions
diff --git a/csit/tests/cps-model-sync/cps-model-sync.robot b/csit/tests/cps-model-sync/cps-model-sync.robot
index 514076f085..b4e61b30d8 100644
--- a/csit/tests/cps-model-sync/cps-model-sync.robot
+++ b/csit/tests/cps-model-sync/cps-model-sync.robot
@@ -78,17 +78,6 @@ Get CM Handle details and confirm it has been updated.
END
END
-Delete cm handle
- ${uri}= Set Variable ${ncmpInventoryBasePath}/v1/ch
- ${headers}= Create Dictionary Content-Type=application/json Authorization=${auth}
- ${response}= POST On Session CPS_URL ${uri} headers=${headers} data=${deletePayload}
- Should Be Equal As Strings ${response.status_code} 200
-
-Get cm handle details and confirm it has been deleted
- ${uri}= Set Variable ${ncmpBasePath}/v1/ch/CmHandleForDelete
- ${headers}= Create Dictionary Authorization=${auth}
- ${response}= GET On Session CPS_URL ${uri} headers=${headers} expected_status=404
-
Check if ietfYang-PNFDemo is READY
${uri}= Set Variable ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
${headers}= Create Dictionary Authorization=${auth}
@@ -107,6 +96,17 @@ Get modules for registered data node
END
END
+Delete cm handle
+ ${uri}= Set Variable ${ncmpInventoryBasePath}/v1/ch
+ ${headers}= Create Dictionary Content-Type=application/json Authorization=${auth}
+ ${response}= POST On Session CPS_URL ${uri} headers=${headers} data=${deletePayload}
+ Should Be Equal As Strings ${response.status_code} 200
+
+Get cm handle details and confirm it has been deleted
+ ${uri}= Set Variable ${ncmpBasePath}/v1/ch/CmHandleForDelete
+ ${headers}= Create Dictionary Authorization=${auth}
+ ${response}= GET On Session CPS_URL ${uri} headers=${headers} expected_status=404
+
*** Keywords ***
Is CM Handle READY
@@ -125,4 +125,4 @@ 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} \ No newline at end of file
+ RETURN ${number_of_items}