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

Test Case check for correct component images #1965

Merged
Changes from 13 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
*** Settings ***
Documentation Test Suite to check for components

Resource ../../../../../../tasks/Resources/RHODS_OLM/install/oc_install.robot

Suite Setup Suite Setup
Suite Teardown Suite Teardown


*** Test Cases ***
Check For Correct Component Images
Fixed Show fixed Hide fixed

Check warning

Code scanning / Robocop

Test case '{{ test_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) Warning test

Test case 'Check For Correct Component Images' has too many keywords inside (12/10)
[Documentation] The purpose is to enforce the check of correct component images on their deployments.
[Tags] Operator RHOAIENG-12576 Smoke
[Template] Check Image On Csv And Deployment
codeflare codeflare-operator-manager odh_codeflare_operator_image

Check warning

Code scanning / Robocop

Trailing whitespace at the end of line Warning test

Trailing whitespace at the end of line
modelregistry model-registry-operator-controller-manager odh_mlmd_grpc_server_image

Check warning

Code scanning / Robocop

Trailing whitespace at the end of line Warning test

Trailing whitespace at the end of line
modelregistry model-registry-operator-controller-manager odh_model_registry_image

Check warning

Code scanning / Robocop

Trailing whitespace at the end of line Warning test

Trailing whitespace at the end of line
trustyai trustyai-service-operator-controller-manager odh_trustyai_service_operator_image
ray kuberay-operator odh_kuberay_operator_controller_image

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (121/120)
kueue kueue-controller-manager odh_kueue_controller_image
workbenches odh-notebook-controller-manager odh_notebook_controller_image
workbenches notebook-controller-deployment odh_kf_notebook_controller_image
dashboard ${DASHBOARD_DEPLOYMENT_NAME} odh_dashboard_image

Check warning

Code scanning / Robocop

Trailing whitespace at the end of line Warning test

Trailing whitespace at the end of line
modelmeshserving modelmesh-controller odh_modelmesh_controller_image
datasciencepipelines data-science-pipelines-operator-controller-manager odh_data_science_pipelines_operator_controller_image

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (136/120)
trainingoperator kubeflow-training-operator odh_training_operator_image


*** Keywords ***
Suite Setup
[Documentation] Suite Setup
RHOSi Setup

Suite Teardown
[Documentation] Suite Teardown
RHOSi Teardown

Check Image On Csv And Deployment
[Documentation] Check Image On Csv And Deployment
[Arguments] ${component} ${deployment_name} ${image}

${rc} ${managementState}= Run And Return Rc And Output
... oc get DataScienceCluster default-dsc -o jsonpath="{.spec.components['${component}'].managementState}"

Check warning

Code scanning / Robocop

Continuation marker should be aligned with starting row Warning test

Continuation marker should be aligned with starting row
IF "${managementState}" == "Managed"

${rc} ${csv_image}= Run And Return Rc And Output
... oc get ClusterServiceVersion -l ${OPERATOR_SUBSCRIPTION_LABEL} -n ${OPERATOR_NAMESPACE} -o jsonpath='{.items[?(@.kind=="ClusterServiceVersion")].spec.relatedImages[?(@.name=="${image}")].image}'

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (209/120)
Should Be Equal "${rc}" "0" msg=${csv_image}
Should Not Be Empty ${csv_image}
Log To Console IMAGE ON CSV IS ${csv_image}

${rc} ${out}= Run And Return Rc And Output

Check notice

Code scanning / Robocop

Variable '{{ name }}' is assigned but not used Note test

Variable '${out}' is assigned but not used
... oc get Deployment ${deployment_name} -n ${APPLICATIONS_NAMESPACE} -o jsonpath='{.spec.template.spec.containers[?(@.images=="${csv_image}")]}'

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (156/120)
Should Be Equal "${rc}" "0" msg=${csv_image} not found on ${deployment_name} deployment
Log To Console SUCCESS: Both CSV and Deployment ${image} images match

END
Loading