Skip to content

Commit

Permalink
Chore: Added sleep and timeout for while loop (red-hat-data-services#…
Browse files Browse the repository at this point in the history
…2029)

* Added sleep and timeout for while loop

* Added If else structure for Gettting Resource Attribute Kw for when value comes empty
  • Loading branch information
asanzgom authored Nov 14, 2024
1 parent a3240e7 commit 00e2391
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ods_ci/tests/Resources/OCP.resource
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,11 @@ Get Resource Attribute
${rc} ${value}= Run And Return Rc And Output
... oc get ${resource_type}/${resource_name} -n ${namespace} -o 'jsonpath={${attribute_path}}'
Should Be Equal "${rc}" "0" msg=${value}
Log To Console ${resource_type} ${resource_name} in the namespace ${namespace} attribute ${attribute_path} value is ${value}
IF "${value}" != "${EMPTY}"
Log To Console ${resource_type} ${resource_name} in the namespace ${namespace} attribute ${attribute_path} value is ${value}
ELSE
Log To Console ${resource_type} ${resource_name} in the namespace ${namespace} attribute ${attribute_path} value is EMPTY
END
RETURN ${value}

Wait For Namespace To Be Active
Expand Down
3 changes: 2 additions & 1 deletion ods_ci/tests/Resources/Page/Operators/ISVs.resource
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ Install ISV Operator From OperatorHub Via CLI # robocop: disable
Oc Apply kind=Subscription src=${operator_sub_filepath}
Wait Until Keyword Succeeds 1 min 0 sec
... Is Resource Present Subscription ${subscription_name} ${namespace} ${IS_PRESENT}
WHILE "${installplan_name}" == "${EMPTY}"
WHILE "${installplan_name}" == "${EMPTY}" limit=5m
${installplan_name}= Get Resource Attribute ${namespace}
... Subscription ${subscription_name} .status.installPlanRef.name
Sleep 20s
END
${installplan_approval}= Get Resource Attribute ${namespace}
... InstallPlan ${installplan_name} .spec.approval
Expand Down

0 comments on commit 00e2391

Please sign in to comment.