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 #1283

Merged
merged 1 commit into from
Mar 14, 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 @@ -9,8 +9,7 @@

*** Variables ***
${CODEFLARE_DIR} codeflare-operator
${CODEFLARE_REPO_URL} %{CODEFLARE_REPO_URL=https://github.com/opendatahub-io/codeflare-operator.git}
${CODEFLARE_REPO_BRANCH} %{CODEFLARE_REPO_BRANCH=main}
${CODEFLARE_RELEASE_ASSETS} %{CODEFLARE_RELEASE_ASSETS=https://github.com/opendatahub-io/codeflare-operator/releases/latest/download}
${ODH_NAMESPACE} %{ODH_NAMESPACE=redhat-ods-applications}
${NOTEBOOK_IMAGE_STREAM_NAME} %{NOTEBOOK_IMAGE_STREAM_NAME=s2i-generic-data-science-notebook}

Expand Down Expand Up @@ -39,7 +38,7 @@
... Tier2
... DistributedWorkloads
... CodeflareOperator
Skip "Skip because of test failures. Currently being investigated"
Skip "Skip because of https://issues.redhat.com/browse/RHOAIENG-3981"
Run Codeflare ODH Test TestMCADRay

Run TestMnistPyTorchMCAD ODH test
Expand All @@ -53,31 +52,41 @@

*** Keywords ***
Prepare Codeflare E2E Test Suite
${result} = Run Process git clone -b ${CODEFLARE_REPO_BRANCH} ${CODEFLARE_REPO_URL} ${CODEFLARE_DIR}
... shell=true stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0
FAIL Unable to clone Codeflare repo ${CODEFLARE_REPO_URL}:${CODEFLARE_REPO_BRANCH}
END

Enable Component ray
Enable Component codeflare
Wait Component Ready ray
Wait Component Ready codeflare
Create Directory %{WORKSPACE}/codeflare-e2e-logs
Create Directory %{WORKSPACE}/codeflare-odh-logs
RHOSi Setup

Teardown Codeflare E2E Test Suite
Log To Console "Removing test binaries"
${result} = Run Process rm -f e2e odh
... 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 codeflare
Disable Component ray
RHOSi Teardown

Run Codeflare E2E Test
[Arguments] ${TEST_NAME}
Log To Console "Downloading compiled test binary e2e"
${result} = Run Process curl --location --silent --output e2e ${CODEFLARE_RELEASE_ASSETS}/e2e && chmod +x 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 retrieve e2e compiled binary
END
Log To Console "Running test: ${TEST_NAME}"
${result} = Run Process go test -timeout 30m -v ./test/e2e -run ${TEST_NAME}
${result} = Run Process ./e2e -test.run ${TEST_NAME}
... shell=true
... stderr=STDOUT
... cwd=${CODEFLARE_DIR}
... env:CODEFLARE_TEST_TIMEOUT_SHORT=5m
... env:CODEFLARE_TEST_TIMEOUT_MEDIUM=10m
... env:CODEFLARE_TEST_TIMEOUT_LONG=20m
Expand All @@ -89,11 +98,18 @@

Run Codeflare ODH Test
[Arguments] ${TEST_NAME}
Log To Console "Downloading compiled test binary odh"
${result} = Run Process curl --location --silent --output odh ${CODEFLARE_RELEASE_ASSETS}/odh && chmod +x odh
... 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 retrieve odh compiled binary
END
Log To Console "Running test: ${TEST_NAME}"
${result} = Run Process go test -timeout 30m -v ./test/odh -run ${TEST_NAME}
${result} = Run Process ./odh -test.run ${TEST_NAME}
... shell=true
... stderr=STDOUT
... cwd=${CODEFLARE_DIR}
... env:CODEFLARE_TEST_TIMEOUT_SHORT=5m
... env:CODEFLARE_TEST_TIMEOUT_MEDIUM=10m
... env:CODEFLARE_TEST_TIMEOUT_LONG=20m
Expand Down
Loading