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

RHODS-12410 - Create a Robot framework test for running DW tests #980

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

jiripetrlik
Copy link
Contributor

The goal is to allow tests from Distributed Workloads repo to be run as robot framework tests (https://github.com/opendatahub-io/distributed-workloads/tree/main/tests).

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robocop found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@jiripetrlik jiripetrlik force-pushed the RHODS-12410 branch 5 times, most recently from bd2926a to 15660fb Compare October 18, 2023 08:22
@jiripetrlik jiripetrlik force-pushed the RHODS-12410 branch 9 times, most recently from 037a39b to 3147a6a Compare October 22, 2023 17:27
@jiripetrlik jiripetrlik force-pushed the RHODS-12410 branch 2 times, most recently from 079af8b to 0cd21a8 Compare October 22, 2023 20:06
[Documentation] Clone Git repository
[Arguments] ${DW_REPO_URL} ${DW_REPO_BRANCH} ${DW_DIR}
${result} = Run Process git clone -b ${DW_REPO_BRANCH} ${DW_REPO_URL} ${DW_DIR} shell=true
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
@jiripetrlik jiripetrlik force-pushed the RHODS-12410 branch 6 times, most recently from 0def0a5 to 81e9b52 Compare October 24, 2023 08:19
${test_resul}= Run Distributed Workloads Tests ${DW_DIR} ${DW_TEST_RESULT_FILE}
Install Go Junit Report Tool
Convert Go Test Results To Junit ${DW_TEST_RESULT_FILE} ${DW_JUNIT_FILE}
IF ${test_result} != 0

Check notice

Code scanning / Robocop

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

'IF' condition can be simplified
${result} = Run Process go install ${GO_JUNIT_REPORT_TOOL}
... shell=true env:GOBIN=${JOB_GO_BIN} 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
${result} = Run Process go install ${GO_JUNIT_REPORT_TOOL}
... shell=true env:GOBIN=${JOB_GO_BIN} 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
${result} = Run Process ${JOB_GO_BIN}/go-junit-report -in ${DW_TEST_RESULT_FILE} -iocopy -out ${DW_JUNIT_FILE}
... 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
... go test -v -timeout ${GO_TEST_TIMEOUT} ./integration 2>&1 > ${DW_TEST_RESULT_FILE}
... shell=true cwd=${DW_DIR}/tests env:ODH_NAMESPACE=redhat-ods-applications
Log To Console ${result.stdout}
${test_output}= Get File ${DW_TEST_RESULT_FILE}

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected ' =' but got '=' instead
@jiripetrlik jiripetrlik force-pushed the RHODS-12410 branch 6 times, most recently from 0b5f4db to 79c2298 Compare October 26, 2023 15:10
@jiripetrlik jiripetrlik marked this pull request as ready for review October 26, 2023 15:10
${result} = Run Process
... go test -v -timeout ${GO_TEST_TIMEOUT} ./integration 2>&1 > ${DW_TEST_RESULT_FILE}
... shell=true cwd=${DW_DIR}/tests env:ODH_NAMESPACE=redhat-ods-applications
... env:DW_TEST_TIMEOUT_LONG=${DW_TEST_TIMEOUT_LONG}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the DW_TEST_TIMEOUT_LONG declared and what does it represent? In DW tests we use env variable CODEFLARE_TEST_TIMEOUT_LONG - https://github.com/project-codeflare/codeflare-common/blob/main/support/support.go#L54

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sutaakar Thank you for noticing it! It should be fixed now.

@jiripetrlik jiripetrlik force-pushed the RHODS-12410 branch 2 times, most recently from f599379 to 910b26b Compare October 30, 2023 08:59
@jiripetrlik
Copy link
Contributor Author

jiripetrlik commented Oct 30, 2023

@aloganat @manosnoam Hello, will you have time to review this PR?

Copy link
Contributor

@sutaakar sutaakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Contributor

github-actions bot commented Nov 2, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
374 0 0 374 100

Copy link

sonarqubecloud bot commented Nov 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication


Skip If "%{OPERATOR_TYPE}" != "RHODS Operator V2"
DistributedWorkloads.Clone Git Repository %{DW_GIT_REPO} %{DW_GIT_REPO_BRANCH} ${DW_DIR}
${test_result}= Run Distributed Workloads Tests ${DW_DIR} ${DW_TEST_RESULT_FILE} -run '.*Test[RK].*[^r]$' -parallel 1 %{DW_GO_TESTS_PARAMS}

Check warning

Code scanning / Robocop

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

Line is too long (155/120)
Copy link
Contributor

@aloganat aloganat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, as the DW tests passed in the sanity run execution

@aloganat aloganat merged commit e2c1c46 into red-hat-data-services:master Nov 13, 2023
7 of 8 checks passed
ChughShilpa pushed a commit to ChughShilpa/ods-ci that referenced this pull request Nov 28, 2023
ChughShilpa pushed a commit to ChughShilpa/ods-ci that referenced this pull request Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants