Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add statement to approve the installplan when a new operator is being installed #1963

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion ods_ci/tests/Resources/Page/Operators/ISVs.resource
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
*** Settings ***
Documentation Collcetion of keywords to manage ISV operators via CLI
Resource ../../RHOSi.resource
Resource ../../OCP.resource
Library OperatingSystem


*** Variables ***
${FILES_RESOURCES_DIRPATH}= tests/Resources/Files
${SUBSCRIPTION_YAML_TEMPLATE_FILEPATH}= ${FILES_RESOURCES_DIRPATH}/isv-operator-subscription.yaml
${OPERATORGROUP_YAML_TEMPLATE_FILEPATH}= ${FILES_RESOURCES_DIRPATH}/isv-operator-group.yaml
${IS_PRESENT}= 0


*** Keywords ***
Expand All @@ -32,7 +34,21 @@ Install ISV Operator From OperatorHub Via CLI # robocop: disable
${rc} ${out}= Run And Return Rc And Output sed -i'' -e "s/<CATALOG_SOURCE>/${catalog_source_name}/g" ${operator_sub_filepath} # robocop: disable
${rc} ${out}= Run And Return Rc And Output sed -i'' -e "s/<CS_NAMESPACE>/${cs_namespace}/g" ${operator_sub_filepath} # 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}
Sleep 15s
${installplan_name}= Get Resource Attribute ${namespace}
... Subscription ${subscription_name} .status.installPlanRef.name
${installplan_approved}= Get Resource Attribute ${namespace}
... InstallPlan ${installplan_name} .spec.approved
IF $installplan_approved == False
${installplan_approval}= Get Resource Attribute ${namespace}
... InstallPlan ${installplan_name} .spec.approval
IF "${installplan_approval}" == "Manual"
${return_code} ${out}= Run And Return Rc And Output oc patch installplan ${installplan_name} -n ${namespace} --type='json' -p '[{"op": "replace", "path": "/spec/approved", "value": true}]' #robocop:disable
Should Be Equal As Integers ${return_code} 0 msg=Error while approving installplan
END
END
Fixed Show fixed Hide fixed

Create Operator Group
[Documentation] Creates the Operator Group object which might be needed by an operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ${IS_NOT_PRESENT} 1
Validate DSC and DSCI Created With Errors When Service Mesh Operator Is Not Installed #robocop:disable
[Documentation] The purpose of this Test Case is to validate that DSC and DSCI are created
... without Service Mesh Operator installed, but with errors
[Tags] Operator Tier3 ODS-2584 RHOAIENG-2514 ExcludeOnDisconnected
[Tags] Operator Tier3 ODS-2584 RHOAIENG-2514

Remove DSC And DSCI Resources
Uninstall Service Mesh Operator CLI
Expand All @@ -50,7 +50,7 @@ Validate DSC and DSCI Created With Errors When Service Mesh Operator Is Not Inst
Validate DSC and DSCI Created With Errors When Serverless Operator Is Not Installed #robocop:disable
[Documentation] The purpose of this Test Case is to validate that DSC and DSCI are created
... without Serverless Operator installed, but with errors
[Tags] Operator Tier3 ODS-2586 RHOAIENG-2512 ExcludeOnDisconnected
[Tags] Operator Tier3 ODS-2586 RHOAIENG-2512

Remove DSC And DSCI Resources
Uninstall Serverless Operator CLI
Expand All @@ -70,7 +70,7 @@ Validate DSC and DSCI Created With Errors When Serverless Operator Is Not Instal
Validate DSC and DSCI Created With Errors When Service Mesh And Serverless Operators Are Not Installed #robocop:disable
[Documentation] The purpose of this Test Case is to validate that DSC and DSCI are created
... without dependant operators ((servicemesh, serverless) installed, but with errors
[Tags] Operator Tier3 ODS-2527 RHOAIENG-2518 ExcludeOnDisconnected
[Tags] Operator Tier3 ODS-2527 RHOAIENG-2518

Remove DSC And DSCI Resources
Uninstall Service Mesh Operator CLI
Expand All @@ -96,7 +96,7 @@ Validate DSC and DSCI Created With No Errors When Kserve Serving Is Unmanaged An
[Documentation] The purpose of this Test Case is to validate that DSC and DSCI are created
... without dependant operators ((servicemesh, serverless) installed and with no errors
... because the Kserve component serving is unmanaged
[Tags] Operator Tier3 RHOAIENG-3472 ExcludeOnDisconnected
[Tags] Operator Tier3 RHOAIENG-3472

Remove DSC And DSCI Resources
Uninstall Service Mesh Operator CLI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ExcludeOnDisconnected
[Tags] RHOAIENG-2517
Fetch Image Url And Update Channel
Check Whether DSC Exists And Save Component Statuses
Fetch Cluster Type By Domain
Expand Down
Loading