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

[RHOAIENG-3757] DW: Reduce time of setting up of e2e tests #1293

Merged
merged 1 commit into from
Mar 15, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
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 @@
*** 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

Check notice

Code scanning / Robocop

IF can be replaced with inline IF Note test

IF can be replaced with inline IF

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
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
Loading