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

Add keyword to find ROSA_HCP environment #2143

Merged
merged 1 commit into from
Jan 3, 2025
Merged
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
13 changes: 13 additions & 0 deletions ods_ci/tests/Resources/OCP.resource
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,16 @@ Is Cluster Type Self-Managed
ELSE
RETURN ${FALSE}
END

Is Test Enviroment ROSA-HCP
[Documentation] Find the test environment based on output of the infrastructure of the cluster
... Returns ${TRUE} if test environment is ROSA_HCP
... Returns ${FALSE} if test environment is not ROSA_HCP
${rc} ${output}= Run And Return Rc And Output
... oc get infrastructure cluster -o jsonpath='{.metadata.labels.hypershift\\.openshift\\.io/managed}'
Should Be Equal As Integers ${rc} 0
IF "${output}" == "true"
RETURN ${TRUE}
ELSE
RETURN ${FALSE}
END
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Documentation This is a resource file for Distributed Workloads.
Library OperatingSystem
Library Process
Resource ../../../../tasks/Resources/RHODS_OLM/install/oc_install.robot


*** Variables ***
Expand Down Expand Up @@ -256,3 +257,17 @@
[Documentation] Check that upstream Go test is not missing
[Arguments] ${test_run_output}
Should Not Contain ${test_run_output} testing: warning: no tests to run No Go tests were run

Verify container images

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Verify container images' does not follow case convention
[Documentation] Verify container images
[Arguments] ${pod_name} ${container} ${expected_image}
${test_env}= Is Test Enviroment ROSA-HCP
Fixed Show fixed Hide fixed

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected ' =' but got '=' instead
# We use Kyverno custom policies to pull unreleased images from quay registry for hypershift clusters
${registry_name} = Set Variable If ${test_env}==True

Check notice

Code scanning / Robocop

'{{ block_name }}' condition can be simplified Note test

'Set Variable If' condition can be simplified
... quay.io
... registry.redhat.io
Log To Console Verifying ${pod_name}'s container image is referred from ${registry_name}
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=${pod_name}
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} ${container}
... ${registry_name}/rhoai/${expected_image}
Log To Console ${pod_name}'s container image is verified
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Documentation Smoke tests for Workloads Orchestration
Library Process
Resource ../../../../tasks/Resources/RHODS_OLM/install/oc_install.robot
Resource ../../../Resources/Page/DistributedWorkloads/DistributedWorkloads.resource


*** Test Cases ***
Expand All @@ -25,8 +26,4 @@
FAIL Can not find kueue-webhook-service service in ${APPLICATIONS_NAMESPACE}
END
Log To Console kueue-webhook-service service exists
Log To Console Verifying kueue-controller-manager's container image is referred from registry.redhat.io
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=kueue-controller-manager-
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} manager
... registry.redhat.io/rhoai/odh-kueue-controller
Log To Console kueue-controller-manager's container image is verified
Verify container images kueue-controller-manager manager odh-kueue-controller

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Verify container images' does not follow case convention
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Documentation Smoke tests for Workloads Training
Library Process
Resource ../../../../tasks/Resources/RHODS_OLM/install/oc_install.robot
Resource ../../../Resources/Page/DistributedWorkloads/DistributedWorkloads.resource
Suite Setup Prepare Codeflare E2E Test Suite
Suite Teardown Teardown Codeflare E2E Test Suite

Expand All @@ -28,11 +29,7 @@
FAIL Can not find kuberay-operator service in ${APPLICATIONS_NAMESPACE}
END
Log To Console kuberay-operator service exists
Log To Console Verifying kuberay-operator's container image is referred from registry.redhat.io
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=kuberay-operator-
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} kuberay-operator
... registry.redhat.io/rhoai/odh-kuberay-operator-controller
Log To Console kuberay-operator's container image is verified
Verify container images kuberay-operator kuberay-operator odh-kuberay-operator-controller

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Verify container images' does not follow case convention

Codeflare smoke test
[Documentation] Check that Codeflare deployment and its monitoring service are up and running
Expand All @@ -54,11 +51,7 @@
FAIL Can not find codeflare-operator-manager-metrics service in ${APPLICATIONS_NAMESPACE}
END
Log To Console codeflare-operator-manager-metrics service exists
Log To Console Verifying codeflare-operator-manager's container image is referred from registry.redhat.io
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=codeflare-operator-manager-
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} manager
... registry.redhat.io/rhoai/odh-codeflare-operator
Log To Console codeflare-operator-manager's container image is verified
Verify container images codeflare-operator-manager manager odh-codeflare-operator

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Verify container images' does not follow case convention

Training operator smoke test
[Documentation] Check that Training operator deployment is up and running
Expand All @@ -72,11 +65,7 @@
IF ${result.rc} != 0
FAIL Timeout waiting for deployment/kubeflow-training-operator to be available in ${APPLICATIONS_NAMESPACE}
END
Log To Console Verifying kubeflow-training-operator's container image is referred from registry.redhat.io
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=kubeflow-training-operator-
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} training-operator
... registry.redhat.io/rhoai/odh-training-operator
Log To Console kubeflow-training-operator's container image is verified
Verify container images kubeflow-training-operator training-operator odh-training-operator

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Verify container images' does not follow case convention


*** Keywords ***
Expand Down
Loading