[ROBOT] Add timout flag for helm unintsll operation 93/128293/5
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Tue, 5 Apr 2022 07:24:09 +0000 (09:24 +0200)
committerKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Tue, 5 Apr 2022 08:16:45 +0000 (10:16 +0200)
We've observed a race condition during testing JOB restarts
for 5gbulkpm. Due to restarts of failing xtesting JOBs
there is need to have fully executed teardown by previous
robot xtesting JOBs before starting new one.

Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Issue-ID: INT-1895
Change-Id: Id725d68bb845020478716874de0d710d037e9c07

robot/resources/chart_museum.robot

index 173e234..8969336 100644 (file)
@@ -62,9 +62,17 @@ Install helm charts from folder
 Uninstall helm charts
     [Documentation]  Uninstall DCAE Servcie using helm charts
     [Arguments]                             ${dcae_service_helm_name}
-    ${helm_uninstall}=                      Set Variable                                    helm uninstall ${dcae_service_helm_name}
+    ${helm_uninstall}=                      Set Variable                                    helm uninstall ${dcae_service_helm_name} --timeout 5m0s
     ${helm_uninstall_command_output}=       Run And Return Rc And Output                    ${helm_uninstall}
     Should Be Equal As Integers             ${helm_uninstall_command_output[0]}             0
+    ${helm_check}=                          Set Variable                                    kubectl get pods -n onap | grep ${dcae_service_helm_name}
+    Wait Until Keyword Succeeds             5 minute                                        5 sec                            Helm charts uninstallation check       ${helm_check}
+
+Helm charts uninstallation check
+    [Arguments]                             ${helm_check}
+    ${helm_uninstall_check_output}=         Run And Return Rc And Output                    ${helm_check}
+    Should Be Equal As Integers             ${helm_uninstall_check_output[0]}               1
+    Log                                     ${helm_uninstall_check_output[1]}