Skip to content

Commit

Permalink
RHOAIENG-18519 - Add KFTO SDK test to downstream automation
Browse files Browse the repository at this point in the history
  • Loading branch information
jiripetrlik committed Feb 10, 2025
1 parent ae896a3 commit 892a40f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,24 @@ Prepare Training Operator E2E Test Suite
Enable Component trainingoperator
Wait Component Ready trainingoperator

Prepare Training Operator SDK Test Suite

Check warning

Code scanning / Robocop

Keyword '{{ keyword_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) Warning test

Keyword 'Prepare Training Operator SDK Test Suite' has too many keywords inside (11/10)
[Documentation] Prepare Training Operator SDK Test Suite
Log To Console "Downloading compiled test binary ${KFTO_BINARY_NAME}"
${result} = Run Process curl --location --silent --output ${KFTO_BINARY_NAME} ${DISTRIBUTED_WORKLOADS_RELEASE_ASSETS}/${KFTO_BINARY_NAME} && chmod +x ${KFTO_BINARY_NAME}

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (179/120)
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
FAIL Unable to retrieve ${KFTO_BINARY_NAME} compiled binary
END
${common_user_token} = Generate User Token ${NOTEBOOK_USER_NAME} ${NOTEBOOK_USER_PASSWORD}
Set Suite Variable ${NOTEBOOK_USER_TOKEN} ${common_user_token}
Log To Console "Log back as cluster admin"
Login To OCP Using API ${OCP_ADMIN_USER.USERNAME} ${OCP_ADMIN_USER.PASSWORD}
Create Directory %{WORKSPACE}/codeflare-${KFTO_BINARY_NAME}-logs
Enable Component trainingoperator
Wait Component Ready trainingoperator

Teardown Training Operator KFTO E2E Test Suite
[Documentation] Teardown Training Operator KFTO E2E Test Suite
Teardown Training Operator E2E Test Suite ${KFTO_BINARY_NAME}
Expand All @@ -143,6 +161,10 @@ Teardown Training Operator E2E Test Suite
Remove File ${test_binary}
Disable Component trainingoperator

Teardown Training Operator SDK Test Suite
[Documentation] Teardown Training Operator SDK Test Suite
Teardown Training Operator E2E Test Suite ${KFTO_BINARY_NAME}

Run Training Operator FMS Test
[Documentation] Run Training Operator FMS Test
[Arguments] ${TEST_NAME}
Expand Down Expand Up @@ -186,6 +208,34 @@ Run Training Operator KFTO Test
FAIL ${TEST_NAME} failed
END

Run Training Operator KFTO SDK Test
[Documentation] Run Training Operator KFTO SDK Test
[Arguments] ${TEST_NAME}

Check warning

Code scanning / Robocop

{{ var_or_arg }} '{{ variable_name }}' overwrites reserved variable '{{ reserved_variable }}' Warning test

Argument '${TEST_NAME}' overwrites reserved variable '${TEST_NAME}'
Log To Console "Running test: ${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:ODH_NAMESPACE=${APPLICATIONS_NAMESPACE}
... env:CODEFLARE_TEST_OUTPUT_DIR=%{WORKSPACE}/codeflare-${KFTO_BINARY_NAME}-logs
... env:AWS_DEFAULT_ENDPOINT=${AWS_DEFAULT_ENDPOINT}
... env:AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
... env:AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
... env:AWS_STORAGE_BUCKET=${AWS_STORAGE_BUCKET}
... env:AWS_STORAGE_BUCKET_MNIST_DIR=${AWS_STORAGE_BUCKET_MNIST_DIR}
... env:PIP_INDEX_URL=${PIP_INDEX_URL}
... env:PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
... env:NOTEBOOK_USER_NAME=${NOTEBOOK_USER_NAME}
... env:NOTEBOOK_USER_TOKEN=${NOTEBOOK_USER_TOKEN}
... env:NOTEBOOK_IMAGE=${NOTEBOOK_IMAGE_3.11}
Log To Console ${result.stdout}
Check missing Go test ${result.stdout}
IF ${result.rc} != 0
FAIL ${TEST_NAME} failed
END

Prepare DistributedWorkloads Integration Test Suite
[Documentation] Prepare DistributedWorkloads Integration Test Suite
Log To Console "Downloading compiled test binary ${ODH_BINARY_NAME}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*** Settings ***
Documentation KFTO SDK tests - https://github.com/opendatahub-io/distributed-workloads/blob/main/tests/kfto/kfto_mnist_sdk_test.go
Resource ../../../../tests/Resources/Page/DistributedWorkloads/DistributedWorkloads.resource
Suite Setup Prepare Training Operator SDK Test Suite
Suite Teardown Teardown Training Operator SDK Test Suite

Check warning

Code scanning / Robocop

Invalid number of empty lines between sections ({{ empty_lines }}/{{ allowed_empty_lines }}) Warning test

Invalid number of empty lines between sections (1/2)
*** Test Cases ***
Run TestMnistSDK KFTO SDK test
[Documentation] Run Go KFTO SDK test: TestMnistSDK
[Tags] Tier1
... KFTOSDK
... DistributedWorkloads
... WorkloadsOrchestration
Run Training Operator KFTO SDK Test TestMnistSDK

0 comments on commit 892a40f

Please sign in to comment.