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

Adapt Trusted CA bundles tests to ODH #1380

1 change: 0 additions & 1 deletion ods_ci/tests/Resources/OCP.resource
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,3 @@ Delete Namespace From Openshift
${rc} ${output}= Run And Return Rc And Output oc delete project ${namespace}
Should Be Equal "${rc}" "0" msg=${output}
END

15 changes: 15 additions & 0 deletions ods_ci/tests/Resources/RHOSi.resource
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
Initialize Global Variables
[Documentation] Sets global variables
[Arguments] ${force_fetch}=False
Assign Vars According To Product
${RHODS_VERSION}= Get RHODS Version ${force_fetch}
Set Global Variable ${RHODS_VERSION}
Set Prometheus Variables
Expand All @@ -82,3 +83,17 @@
Variable Should Exist ${MONITORING_NAMESPACE}
Variable Should Exist ${OPERATOR_NAMESPACE}
Variable Should Exist ${NOTEBOOKS_NAMESPACE}

Assign Vars According To Product
[Documentation] Assign vars related to product
IF "${PRODUCT}" == "RHODS"
Set Suite Variable ${OPERATOR_APPNAME} Red Hat OpenShift AI
Dismissed Show dismissed Hide dismissed
Set Suite Variable ${OPERATOR_NAME} Red Hat OpenShift AI

Check notice

Code scanning / Robocop

{{ set_variable_keyword }} can be replaced with VAR Note test

Set Suite Variable can be replaced with VAR
Set Suite Variable ${OPERATOR_DEPLOYMENT_NAME} rhods-operator
Dismissed Show dismissed Hide dismissed
Set Suite Variable ${OPERATOR_LABEL_SELECTOR} name=rhods-operator

Check notice

Code scanning / Robocop

{{ set_variable_keyword }} can be replaced with VAR Note test

Set Suite Variable can be replaced with VAR
ELSE IF "${PRODUCT}" == "ODH"
Set Suite Variable ${OPERATOR_APPNAME} Open Data Hub Operator

Check notice

Code scanning / Robocop

{{ set_variable_keyword }} can be replaced with VAR Note test

Set Suite Variable can be replaced with VAR
Set Suite Variable ${OPERATOR_NAME} Open Data Hub Operator

Check notice

Code scanning / Robocop

{{ set_variable_keyword }} can be replaced with VAR Note test

Set Suite Variable can be replaced with VAR
Set Suite Variable ${OPERATOR_DEPLOYMENT_NAME} opendatahub-operator-controller-manager

Check notice

Code scanning / Robocop

{{ set_variable_keyword }} can be replaced with VAR Note test

Set Suite Variable can be replaced with VAR
Set Suite Variable ${OPERATOR_LABEL_SELECTOR} control-plane=controller-manager

Check notice

Code scanning / Robocop

{{ set_variable_keyword }} can be replaced with VAR Note test

Set Suite Variable can be replaced with VAR
END
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Documentation Test Cases to verify Trusted CA Bundle support
Library Collections
Resource ../../../../Resources/OCP.resource
Resource ../../../../Resources/ODS.robot
Resource ../../../../Resources/RHOSi.resource
Suite Setup Suite Setup
Suite Teardown Suite Teardown


*** Variables ***
${OPERATOR_NS} ${OPERATOR_NAMESPACE}
${RHOAI_OPERATOR_DEPLOYMENT_NAME} rhods-operator
${TEST_NS} test-trustedcabundle
${DSCI_NAME} default-dsci
${TRUSTED_CA_BUNDLE_CONFIGMAP} odh-trusted-ca-bundle
Expand Down Expand Up @@ -74,7 +74,7 @@ Validate Trusted CA Bundles State Removed
Suite Setup
[Documentation] Suite Setup
RHOSi Setup
Wait Until Operator Ready ${RHOAI_OPERATOR_DEPLOYMENT_NAME} ${OPERATOR_NS}
Wait Until Operator Ready ${OPERATOR_DEPLOYMENT_NAME} ${OPERATOR_NS}
Wait For DSCI Ready State ${DSCI_NAME} ${OPERATOR_NS}
Create Namespace In Openshift ${TEST_NS}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Library SeleniumLibrary
Library OpenShiftLibrary
Resource ../../../../Resources/Page/OCPDashboard/OCPDashboard.resource
Resource ../../../../Resources/OCP.resource
Resource ../../../../Resources/RHOSi.resource
Suite Setup Suite Setup
Suite Teardown Suite Teardown

Expand All @@ -13,15 +14,14 @@ Suite Teardown Suite Teardown
${KNATIVESERVING_NS} knative-serving
${ISTIO_NS} istio-system
${regex_pattern} ERROR
${LABEL_SELECTOR} name=rhods-operator


*** Test Cases ***
Validate DSC creates all Serverless CRs
[Documentation] The purpose of this Test Case is to validate the creation
... of Serverless Custom Resources
... ProductBug: RHOAIENG-4358
[Tags] Operator ODS-2600 ProductBug
Assign Vars According To Product ${PRODUCT}
Resource Should Exist KnativeServing knative-serving ${KNATIVESERVING_NS}
Resource Status Should Be oc get KnativeServing knative-serving -n ${KNATIVESERVING_NS} -o json | jq '.status.conditions[] | select(.type=="Ready") | .status' KnativeServing "True" # robocop: disable
Resource Should Exist Gateway knative-ingress-gateway ${KNATIVESERVING_NS}
Expand All @@ -32,7 +32,7 @@ Validate DSC creates all Serverless CRs
... label_selector=app.kubernetes.io/component=controller timeout=120
${pod_names}= Get Pod Names ${KNATIVESERVING_NS} app.kubernetes.io/component=controller
Verify Containers Have Zero Restarts ${pod_names} ${KNATIVESERVING_NS}
${podname}= Get Pod Name ${OPERATOR_NAMESPACE} ${LABEL_SELECTOR}
${podname}= Get Pod Name ${OPERATOR_NAMESPACE} ${OPERATOR_LABEL_SELECTOR}
Verify Pod Logs Do Not Contain ${podname} ${OPERATOR_NAMESPACE} ${regex_pattern} rhods-operator
Wait For DSC Conditions Reconciled ${KNATIVESERVING_NS} default-dsc

Expand All @@ -48,17 +48,6 @@ Suite Teardown
Close All Browsers
RHOSi Teardown

Assign Vars According To Product
[Documentation] Assign vars related to product
[Arguments] ${PRODUCT}
IF "${PRODUCT}" == "RHODS"
Set Suite Variable ${OPERATOR_APPNAME} Red Hat OpenShift AI
Set Suite Variable ${OPERATOR_NAME} Red Hat OpenShift AI
ELSE IF "${PRODUCT}" == "ODH"
Set Suite Variable ${OPERATOR_APPNAME} Open Data Hub Operator
Set Suite Variable ${OPERATOR_NAME} Open Data Hub Operator
END

Wait For DSC Conditions Reconciled
[Documentation] Checks all DSC conditions to be successfully reconciled
[Arguments] ${namespace} ${dsc_name}
Expand Down
Loading