Skip to content

Commit

Permalink
[RHOAIENG-3757] Kuberay: Reduce time of setting up of e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sutaakar committed Mar 15, 2024
1 parent ac178f9 commit 85a14d7
Showing 1 changed file with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ Library Process
Resource ../../../tasks/Resources/RHODS_OLM/install/oc_install.robot

*** Variables ***
${KUBERAY_DIR} kuberay
${KUBERAY_REPO_URL} %{KUBERAY_REPO_URL=https://github.com/red-hat-data-services/kuberay}
${KUBERAY_REPO_BRANCH} %{KUBERAY_REPO_BRANCH=master}
${KUBERAY_RELEASE_ASSETS} %{KUBERAY_RELEASE_ASSETS=https://github.com/opendatahub-io/kuberay/releases/latest/download}

*** Test Cases ***
Run TestRayJob test
Expand Down Expand Up @@ -39,32 +37,41 @@ Run TestRayJobSuspend test
*** Keywords ***
Prepare Kuberay E2E Test Suite
[Documentation] Prepare Kuberay E2E Test Suite
${result} = Run Process git clone -b ${KUBERAY_REPO_BRANCH} ${KUBERAY_REPO_URL} ${KUBERAY_DIR}
... shell=true stderr=STDOUT
Log To Console "Downloading compiled test binary e2e"
${result} = Run Process curl --location --silent --output e2e ${KUBERAY_RELEASE_ASSETS}/e2e && chmod +x e2e
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0
FAIL Unable to clone Kuberay repo ${KUBERAY_REPO_BRANCH}:${KUBERAY_REPO_URL}:${KUBERAY_DIR}
FAIL Unable to retrieve e2e compiled binary
END
Enable Component ray
RHOSi Setup
Wait Component Ready ray

Teardown Kuberay E2E Test Suite
Log To Console "Removing test binaries"
${result} = Run Process rm -f e2e
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0
FAIL Unable to remove compiled binaries
END
Disable Component ray
RHOSi Teardown

Run Kuberay E2E Test
[Documentation] Run Kuberay E2E Test
[Arguments] ${test_name}
Log To Console Running Kuberay E2E test: ${test_name}
${result} = Run Process go test -timeout 30m -parallel 1 -v ./test/e2e -run ${test_name}
${result} = Run Process ./e2e -test.timeout 30m -test.parallel 1 -test.run ${test_name}
... env:KUBERAY_TEST_TIMEOUT_SHORT=2m
... env:KUBERAY_TEST_TIMEOUT_MEDIUM=7m
... env:KUBERAY_TEST_TIMEOUT_LONG=10m
... env:KUBERAY_TEST_RAY_IMAGE=quay.io/project-codeflare/ray:latest-py39-cu118
... shell=true
... stderr=STDOUT
... cwd=${KUBERAY_DIR}/ray-operator
... timeout=20m
... stdout=${TEMPDIR}/output.txt
Log To Console ${result.stdout}
Expand Down

0 comments on commit 85a14d7

Please sign in to comment.