diff --git a/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0108__rhods_operator_logs_verification.robot b/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0108__rhods_operator_logs_verification.robot index 12dbfda9a..4705e9653 100644 --- a/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0108__rhods_operator_logs_verification.robot +++ b/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0108__rhods_operator_logs_verification.robot @@ -18,18 +18,19 @@ Suite Teardown RHOSi Teardown *** Variables *** -${regex_pattern} level=([Ee]rror).*|([Ff]ailed) to list .* +${regex_pattern} level":"([Ee]rror).*|([Ff]ailed) to list .* *** Test Cases *** -Verify RHODS Operator Logs +Verify RHODS Operator Logs After Restart [Tags] Sanity ... ODS-1007 ... Operator + Restart RHODS Operator Pod #Get the POD name ${data} Run Keyword Oc Get kind=Pod namespace=${OPERATOR_NAMESPACE} label_selector=${OPERATOR_LABEL_SELECTOR} #Capture the logs based on containers - ${val} Run oc logs --tail=1000000 ${data[0]['metadata']['name']} -n ${OPERATOR_NAMESPACE} -c ${OPERATOR_POD_CONTAINER_NAME} + ${val} Run oc logs --tail=-1 ${data[0]['metadata']['name']} -n ${OPERATOR_NAMESPACE} -c ${OPERATOR_POD_CONTAINER_NAME} #To check if command has been successfully executed and the logs have been captured IF len($val)==${0} FAIL Either OC command has not been executed successfully or Logs are not present #Filter the error msg from the log captured @@ -40,3 +41,10 @@ Verify RHODS Operator Logs #Verify if captured logs has any error entry if yes fail the TC IF ${length} != ${0} FAIL There are some error entry present in opeartor logs '${entry_msg}' ... ELSE Log Operator log looks clean + + +*** Keywords *** +Restart RHODS Operator Pod + [Documentation] Restart the operator Pod by deleting it and waiting for a new one to be Ready + Oc Delete kind=Pod namespace=${OPERATOR_NAMESPACE} label_selector=${OPERATOR_LABEL_SELECTOR} + Wait For Pods Status namespace=${OPERATOR_NAMESPACE} label_selector=${OPERATOR_LABEL_SELECTOR} timeout=120 diff --git a/ods_ci/tests/Tests/1100__data_science_pipelines/1102__data-science-pipelines-api.robot b/ods_ci/tests/Tests/1100__data_science_pipelines/1102__data-science-pipelines-api.robot index d1cfd7d6a..08c553f77 100644 --- a/ods_ci/tests/Tests/1100__data_science_pipelines/1102__data-science-pipelines-api.robot +++ b/ods_ci/tests/Tests/1100__data_science_pipelines/1102__data-science-pipelines-api.robot @@ -105,7 +105,7 @@ Verify DSPO Logs Show Error Encountered When Parsing DSPA TRY WHILE not ${stopped} limit=${timeout} Sleep 1s - ${logs} = Run oc logs --tail=1000000 ${pod_name} -n ${APPLICATIONS_NAMESPACE} + ${logs} = Run oc logs --tail=-1 ${pod_name} -n ${APPLICATIONS_NAMESPACE} ${stopped} = Set Variable If "Encountered error when parsing CR" in """${logs}""" True False END EXCEPT WHILE loop was aborted type=start