Skip to content

Commit

Permalink
Add keyword to find test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ChughShilpa committed Dec 24, 2024
1 parent ccb0d07 commit 842e56b
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 20 deletions.
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

Check warning

Code scanning / Robocop

Underscores in keyword name '{{ keyword_name }}' can be replaced with spaces Warning test

Underscores in keyword name 'Is Test Enviroment ROSA_HCP' can be replaced with spaces
[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

Check warning

Code scanning / Robocop

Missing trailing blank line at the end of file Warning test

Missing trailing blank line at the end of file
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@ Kueue smoke test
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
${test_env}= Is Test Enviroment ROSA_HCP

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

Check warning

Code scanning / Robocop

Underscores in keyword name '{{ keyword_name }}' can be replaced with spaces Warning test

Underscores in keyword name 'Is Test Enviroment ROSA_HCP' can be replaced with spaces
IF ${test_env}==True

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
# We use Kyverno custom policies to pull unreleased images from quay registry for hypershift clusters

Check failure

Code scanning / Robocop

Indent expected. Provide 2 or more spaces of indentation for statements inside block Error test

Indent expected. Provide 2 or more spaces of indentation for statements inside block
Log To Console Verifying kueue-controller-manager's container image is referred from quay.io
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=kueue-controller-manager-
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} manager
... quay.io/rhoai/odh-kueue-controller
Log To Console kueue-controller-manager's container image is verified
ELSE
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
END
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,21 @@ Ray smoke test
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
${test_env}= Is Test Enviroment ROSA_HCP

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

Check warning

Code scanning / Robocop

Underscores in keyword name '{{ keyword_name }}' can be replaced with spaces Warning test

Underscores in keyword name 'Is Test Enviroment ROSA_HCP' can be replaced with spaces
IF ${test_env}==True

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
# We use Kyverno custom policies to pull unreleased images from quay registry for hypershift clusters

Check failure

Code scanning / Robocop

Indent expected. Provide 2 or more spaces of indentation for statements inside block Error test

Indent expected. Provide 2 or more spaces of indentation for statements inside block
Log To Console Verifying kuberay-operator's container image is referred from quay.io
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=kuberay-operator-
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} kuberay-operator
... quay.io/rhoai/odh-kuberay-operator-controller
Log To Console kuberay-operator's container image is verified
ELSE
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
END

Codeflare smoke test
[Documentation] Check that Codeflare deployment and its monitoring service are up and running
Expand All @@ -54,11 +64,21 @@ Codeflare smoke test
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
${test_env}= Is Test Enviroment ROSA_HCP

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

Check warning

Code scanning / Robocop

Underscores in keyword name '{{ keyword_name }}' can be replaced with spaces Warning test

Underscores in keyword name 'Is Test Enviroment ROSA_HCP' can be replaced with spaces
IF ${test_env}==True

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
# We use Kyverno custom policies to pull unreleased images from quay registry for hypershift clusters

Check failure

Code scanning / Robocop

Indent expected. Provide 2 or more spaces of indentation for statements inside block Error test

Indent expected. Provide 2 or more spaces of indentation for statements inside block
Log To Console Verifying codeflare-operator-manager's container image is referred from quay.io
${pod} = Find First Pod By Name namespace=${APPLICATIONS_NAMESPACE} pod_regex=codeflare-operator-manager-
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} manager
... quay.io/rhoai/odh-codeflare-operator
Log To Console codeflare-operator-manager's container image is verified
ELSE
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
END

Training operator smoke test
[Documentation] Check that Training operator deployment is up and running
Expand All @@ -72,11 +92,21 @@ Training operator smoke test
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
${test_env}= Is Test Enviroment ROSA_HCP

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

Check warning

Code scanning / Robocop

Underscores in keyword name '{{ keyword_name }}' can be replaced with spaces Warning test

Underscores in keyword name 'Is Test Enviroment ROSA_HCP' can be replaced with spaces
IF ${test_env}==True

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
# We use Kyverno custom policies to pull unreleased images from quay registry for hypershift clusters

Check failure

Code scanning / Robocop

Indent expected. Provide 2 or more spaces of indentation for statements inside block Error test

Indent expected. Provide 2 or more spaces of indentation for statements inside block
Log To Console Verifying kubeflow-training-operator's container image is referred from quay.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
... quay.io/rhoai/odh-training-operator
Log To Console kubeflow-training-operator's container image is verified
ELSE
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
END


*** Keywords ***
Expand Down

0 comments on commit 842e56b

Please sign in to comment.