Skip to content

Commit

Permalink
Merge branch 'master' into pythonrest-api
Browse files Browse the repository at this point in the history
  • Loading branch information
tarukumar authored Jan 10, 2025
2 parents 569ee66 + 4d10c7f commit b5b250f
Show file tree
Hide file tree
Showing 12 changed files with 149 additions and 118 deletions.
14 changes: 7 additions & 7 deletions ods_ci/tests/Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ Clone Git Repository
Get Operator Starting Version
[Documentation] Returns the starting version of the operator in the upgrade chain
${rc} ${out}= Run And Return RC And Output
... oc get subscription rhods-operator -n ${OPERATOR_NAMESPACE} -o yaml | yq '.spec.startingCSV' | awk -F. '{print $2"."$3"."$4}' # robocop: disable
... oc get subscription rhods-operator -n ${OPERATOR_NAMESPACE} -o yaml | yq -r '.spec.startingCSV' | awk -F. '{print $2"."$3"."$4}' # robocop: disable
Should Be Equal As Integers ${rc} 0
RETURN ${out}

Expand All @@ -601,14 +601,14 @@ Skip If Operator Starting Version Is Not Supported
Skip If condition="${supported}"=="${FALSE}" msg=This test is skipped because starting operator version < ${minimum_version}

Skip If Cluster Type Is Self-Managed
[Documentation] Skips test if cluster type is Self-managed
${cluster_type}= Is Cluster Type Self-Managed
Skip If condition=${cluster_type}==True msg=This test is skipped for Self-managed cluster
[Documentation] Skips test if cluster type is Self-managed
${cluster_type}= Is Cluster Type Managed
Skip If condition=${cluster_type}==False msg=This test is skipped for Self-managed cluster

Skip If Cluster Type Is Managed
[Documentation] Skips test if cluster type is Managed
${cluster_type}= Is Cluster Type Self-Managed
Skip If condition=${cluster_type}==False msg=This test is skipped for Managed cluster
[Documentation] Skips test if cluster type is Managed
${cluster_type}= Is Cluster Type Managed
Skip If condition=${cluster_type}==True msg=This test is skipped for Managed cluster

Delete All ${resource_type} In Namespace By Name
[Documentation] Force delete all ${resource_type} named '${resource_type}' in namespace '${namespace}'
Expand Down
20 changes: 9 additions & 11 deletions ods_ci/tests/Resources/OCP.resource
Original file line number Diff line number Diff line change
Expand Up @@ -333,17 +333,15 @@ Wait For Namespace To Be Active
Log ${value}
Should Be Equal As Integers ${rc} 0

Is Cluster Type Self-Managed
[Documentation] Get the value of cluster type depending on the console URL domain
... Returns ${TRUE} if cluster type is Self-Managed
... Returns ${FALSE} if cluster type is Managed
${matches}= Get Regexp Matches ${OCP_CONSOLE_URL} rh-ods
${size}= Get Length ${matches}
IF ${size}>0
${domain}= Get From List ${matches} 0
IF "${domain}" == "rh-ods"
RETURN ${TRUE}
END
Is Cluster Type Managed
[Documentation] Find the cluster type based on output of the infrastructure of the cluster
... Returns ${TRUE} if cluster type is Managed
... Returns ${FALSE} if cluster type is Self-Managed
${rc} ${output}= Run And Return Rc And Output
... oc get infrastructure cluster -o jsonpath='{.status.platformStatus.*.resourceTags[?(@.key=="red-hat-managed")].value}'
Should Be Equal As Integers ${rc} 0
IF "${output}" == "true"
RETURN ${TRUE}
ELSE
RETURN ${FALSE}
END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ ${NOTEBOOK_IMAGE_3.11} quay.io/modh/odh-generic-data-science-n
${NOTEBOOK_IMAGE_3.9} quay.io/modh/odh-generic-data-science-notebook@sha256:b1066204611b4bcfa6172c3115650a8e8393089d5606458fa0d8c53633d2ce17
${NOTEBOOK_USER_NAME} ${TEST_USER_3.USERNAME}
${NOTEBOOK_USER_PASSWORD} ${TEST_USER_3.PASSWORD}
${KFTO_CORE_BINARY_NAME} kfto
${KFTO_UPGRADE_BINARY_NAME} kfto-upgrade
${FMS_BINARY_NAME} fms
${KFTO_BINARY_NAME} kfto
${ODH_BINARY_NAME} odh
${PIP_INDEX_URL} ${PIP_INDEX_URL}
${PIP_TRUSTED_HOST} ${PIP_TRUSTED_HOST}
Expand Down Expand Up @@ -105,13 +105,13 @@ Cleanup Codeflare-SDK Setup
Log To Console "Removing directory ${CODEFLARE-SDK_DIR}"
Remove Directory ${CODEFLARE-SDK_DIR} recursive=True

Prepare Training Operator E2E Core Test Suite
[Documentation] Prepare Training Operator E2E Core Test Suite
Prepare Training Operator E2E Test Suite ${KFTO_CORE_BINARY_NAME}
Prepare Training Operator KFTO E2E Test Suite
[Documentation] Prepare Training Operator KFTO E2E Test Suite
Prepare Training Operator E2E Test Suite ${KFTO_BINARY_NAME}

Prepare Training Operator E2E Upgrade Test Suite
[Documentation] Prepare Training Operator E2E Upgrade Test Suite
Prepare Training Operator E2E Test Suite ${KFTO_UPGRADE_BINARY_NAME}
Prepare Training Operator FMS E2E Test Suite
[Documentation] Prepare Training Operator FMS E2E Test Suite
Prepare Training Operator E2E Test Suite ${FMS_BINARY_NAME}

Prepare Training Operator E2E Test Suite
[Documentation] Prepare Training Operator E2E Test Suite
Expand All @@ -128,13 +128,13 @@ Prepare Training Operator E2E Test Suite
Enable Component trainingoperator
Wait Component Ready trainingoperator

Teardown Training Operator E2E Core Test Suite
[Documentation] Prepare Training Operator E2E Core Test Suite
Teardown Training Operator E2E Test Suite ${KFTO_CORE_BINARY_NAME}
Teardown Training Operator KFTO E2E Test Suite
[Documentation] Teardown Training Operator KFTO E2E Test Suite
Teardown Training Operator E2E Test Suite ${KFTO_BINARY_NAME}

Teardown Training Operator E2E Upgrade Test Suite
[Documentation] Prepare Training Operator E2E Upgrade Test Suite
Teardown Training Operator E2E Test Suite ${KFTO_UPGRADE_BINARY_NAME}
Teardown Training Operator FMS E2E Test Suite
[Documentation] Teardown Training Operator FMS E2E Test Suite
Teardown Training Operator E2E Test Suite ${FMS_BINARY_NAME}

Teardown Training Operator E2E Test Suite
[Documentation] Teardown Training Operator E2E Test Suite
Expand All @@ -143,27 +143,17 @@ Teardown Training Operator E2E Test Suite
Remove File ${test_binary}
Disable Component trainingoperator

Run Training Operator ODH Core Test
[Documentation] Run Training Operator ODH Core Test
Run Training Operator FMS Test
[Documentation] Run Training Operator FMS Test
[Arguments] ${TEST_NAME}
Run Training Operator ODH Test ${TEST_NAME} ${KFTO_CORE_BINARY_NAME}

Run Training Operator ODH Upgrade Test
[Documentation] Run Training Operator ODH Upgrade Test
[Arguments] ${TEST_NAME}
Run Training Operator ODH Test ${TEST_NAME} ${KFTO_UPGRADE_BINARY_NAME}

Run Training Operator ODH Test
[Documentation] Run Training Operator ODH Test
[Arguments] ${TEST_NAME} ${test_binary}
Log To Console "Running test: ${TEST_NAME}"
${result} = Run Process ./${test_binary} -test.run ${TEST_NAME}
${result} = Run Process ./${FMS_BINARY_NAME} -test.run ${TEST_NAME}
... shell=true
... stderr=STDOUT
... env:CODEFLARE_TEST_TIMEOUT_SHORT=5m
... env:CODEFLARE_TEST_TIMEOUT_MEDIUM=10m
... env:CODEFLARE_TEST_TIMEOUT_LONG=20m
... env:CODEFLARE_TEST_OUTPUT_DIR=%{WORKSPACE}/codeflare-${test_binary}-logs
... env:CODEFLARE_TEST_OUTPUT_DIR=%{WORKSPACE}/codeflare-${FMS_BINARY_NAME}-logs
... env:FMS_HF_TUNING_IMAGE=${FMS_HF_TUNING_IMAGE}
Log To Console ${result.stdout}
Check missing Go test ${result.stdout}
Expand All @@ -175,13 +165,13 @@ Run Training Operator KFTO Test
[Documentation] Run Training Operator KFTO Test
[Arguments] ${TEST_NAME} ${TRAINING_IMAGE}
Log To Console "Running test: ${TEST_NAME}"
${result} = Run Process ./${KFTO_CORE_BINARY_NAME} -test.run ${TEST_NAME}
${result} = Run Process ./${KFTO_BINARY_NAME} -test.run ${TEST_NAME}
... shell=true
... stderr=STDOUT
... env:CODEFLARE_TEST_TIMEOUT_SHORT=5m
... env:CODEFLARE_TEST_TIMEOUT_MEDIUM=10m
... env:CODEFLARE_TEST_TIMEOUT_LONG=20m
... env:CODEFLARE_TEST_OUTPUT_DIR=%{WORKSPACE}/codeflare-${KFTO_CORE_BINARY_NAME}-logs
... env:CODEFLARE_TEST_OUTPUT_DIR=%{WORKSPACE}/codeflare-${KFTO_BINARY_NAME}-logs
... env:CODEFLARE_TEST_TRAINING_IMAGE=${TRAINING_IMAGE}
Log To Console ${result.stdout}
Check missing Go test ${result.stdout}
Expand Down
Loading

0 comments on commit b5b250f

Please sign in to comment.