From 2cfb81d376c33c741a00b32486ff8f0344c55fb9 Mon Sep 17 00:00:00 2001 From: rnetser Date: Tue, 1 Oct 2024 12:47:24 +0300 Subject: [PATCH] update 2.13 rh-pre-commit.version: 2.3.1 rh-pre-commit.check-secrets: ENABLED --- ods_ci/tests/Resources/Common.robot | 9 +++++---- ods_ci/tests/Resources/OCP.resource | 10 ++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ods_ci/tests/Resources/Common.robot b/ods_ci/tests/Resources/Common.robot index cba7f048f..4e67e9eca 100644 --- a/ods_ci/tests/Resources/Common.robot +++ b/ods_ci/tests/Resources/Common.robot @@ -437,11 +437,12 @@ Extract URLs From Text RETURN ${urls} Run And Verify Command - [Documentation] Run an oc delete command and log the output and errors - [Arguments] ${command} - ${result}= Run Process ${command} shell=yes - Log ${result.stdout}\n${result.stderr} console=True + [Documentation] Run and verify shell command + [Arguments] ${command} ${print_to_log}=${TRUE} + ${result}= Run Process ${command} shell=yes stderr=STDOUT + IF ${print_to_log} Log ${result.stdout} console=True Should Be True ${result.rc} == 0 + RETURN ${result.stdout} Run And Watch Command [Documentation] Run any shell command (including args) with optional: diff --git a/ods_ci/tests/Resources/OCP.resource b/ods_ci/tests/Resources/OCP.resource index 464635b19..87aa8004e 100644 --- a/ods_ci/tests/Resources/OCP.resource +++ b/ods_ci/tests/Resources/OCP.resource @@ -124,6 +124,16 @@ Wait For Pods To Be Ready Length Should Be ${replicas} ${exp_replicas} END +Wait For Deployment Replica To Be Ready + [Documentation] Wait for Deployment of ${label_selector} in ${namespace} to have the Replica-Set Ready + [Arguments] ${namespace} ${label_selector} ${timeout}=600s + Log To Console Waiting for Deployment with label "${label_selector}" in Namespace "${namespace}", to have desired Replica-Set + ${output} = Wait Until Keyword Succeeds ${timeout} 3s Run And Verify Command + ... oc wait -n ${namespace} --for condition\=ready pod -l "${label_selector}" --timeout\=${timeout} + ... print_to_log=${FALSE} + Run And Verify Command + ... oc get deployment -l ${label_selector} -n ${namespace} -o json | jq -e '.status | .replicas \=\= .readyReplicas' + Wait For Pods To Succeed [Arguments] ${label_selector} ${namespace} ${timeout}=300s ${exp_replicas}=${NONE} Wait Until Keyword Succeeds ${timeout} 3s