From 3d63cbbab413f074f5b38328acc577d418974bcc Mon Sep 17 00:00:00 2001 From: asanzgom Date: Tue, 12 Nov 2024 17:18:44 +0100 Subject: [PATCH 1/2] Added Operator Tag back again --- .../2001__disruptive_tests/2003__smcp_already_created.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot b/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot index 20bcca38a..c1ad46ac5 100644 --- a/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot +++ b/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot @@ -29,7 +29,7 @@ ${MSSG_REGEX} denied the request: only one service *** Test Cases *** Validate Service Mesh Control Plane Already Created [Documentation] This Test Case validates that only one ServiceMeshControlPlane is allowed to be installed per project/namespace - [Tags] RHOAIENG-2517 + [Tags] RHOAIENG-2517 Operator Fetch Image Url And Update Channel Check Whether DSC Exists And Save Component Statuses Fetch Cluster Type By Domain From e3b719477cad6ea8ac59a253788f391221295c71 Mon Sep 17 00:00:00 2001 From: asanzgom Date: Wed, 13 Nov 2024 12:16:40 +0100 Subject: [PATCH 2/2] Added while loop to wait for smcp error message on logs --- .../2003__smcp_already_created.robot | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot b/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot index c1ad46ac5..aea001494 100644 --- a/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot +++ b/ods_ci/tests/Tests/2001__disruptive_tests/2003__smcp_already_created.robot @@ -23,7 +23,7 @@ ${INSTALL_TYPE} CLi ${TEST_ENV} PSI ${IS_PRESENT} 0 ${IS_NOT_PRESENT} 1 -${MSSG_REGEX} denied the request: only one service mesh may be installed per project/namespace +${MSG_REGEX} denied the request: only one service mesh may be installed per project/namespace *** Test Cases *** @@ -142,17 +142,20 @@ Operator Deployment Should Be Ready Verify Pod Logs Contain Error [Documentation] Checks whether there is a SMCP related error on the Pod Logs ${pod_name}= Get Pod Name ${OPERATOR_NAMESPACE} ${OPERATOR_LABEL_SELECTOR} - ${pod_logs}= Oc Get Pod Logs - ... name=${pod_name} - ... namespace=${OPERATOR_NAMESPACE} - ... container=${OPERATOR_POD_CONTAINER_NAME} - ${match_list}= Get Regexp Matches ${pod_logs} ${MSSG_REGEX} - ${entry_msg}= Remove Duplicates ${match_list} - ${length}= Get Length ${entry_msg} - IF ${length} == ${0} - FAIL Pod ${pod_name} logs should contain message ${MSSG_REGEX}. - ELSE - Log message=Pod ${pod_name} logs contain error message '${MSSG_REGEX}' level=INFO + ${length}= Set Variable 0 + TRY + WHILE ${length} == 0 limit=5m + ${pod_logs}= Oc Get Pod Logs + ... name=${pod_name} + ... namespace=${OPERATOR_NAMESPACE} + ... container=${OPERATOR_POD_CONTAINER_NAME} + ${match_list}= Get Regexp Matches ${pod_logs} ${MSG_REGEX} + ${entry_msg}= Remove Duplicates ${match_list} + ${length}= Get Length ${entry_msg} + Sleep 10s + END + EXCEPT + Fail msg=Pod ${pod_name} logs should contain message '${MSG_REGEX}' END Cleanup Olm Install Dir