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

[Fix] the tests for custom image import #1920

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

jstourac
Copy link
Member

@jstourac jstourac commented Oct 10, 2024

https://issues.redhat.com/browse/RHOAIENG-1192 has been resolved, so we can update that test accordingly.

Plust this fixes another one test in the custom image import and fixes some common keywords from the ODHDashboard.robot file.


CI:

image

@jstourac jstourac added the enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) label Oct 10, 2024
@jstourac jstourac self-assigned this Oct 10, 2024
Copy link
Contributor

github-actions bot commented Oct 10, 2024

Robot Results

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

This fixes multiple tests in the custom image import and fixes some
common keywords from the ODHDashboard.robot file.
Copy link

# Wait for the image to disappear from the list
Wait Until Page Does Not Contain Element xpath:${custom_image_kebab_btn} timeout=10s
# Assure that the actual ImageStream is also removed
${rc} ${out}= Run And Return Rc And Output

Check notice

Code scanning / Robocop

Variable '{{ name }}' is assigned but not used Note test

Variable '${out}' is assigned but not used
Wait Until Page Contains Unable to add notebook image: HTTP request failed
Log Unable to add second image with error message "Unable to add notebook image: HTTP request failed" due to RHOAIENG-1192 level=WARN # robocop: disable
# Assure that the expected error message is shown in the modal window
${image_name_id}= Replace String ${IMG_NAME} ${SPACE} -

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
Log Unable to add second image with error message "Unable to add notebook image: HTTP request failed" due to RHOAIENG-1192 level=WARN # robocop: disable
# Assure that the expected error message is shown in the modal window
${image_name_id}= Replace String ${IMG_NAME} ${SPACE} -
Wait Until Page Contains Unable to add notebook image: imagestreams.image.openshift.io "custom-${image_name_id}" already exists

Check warning

Code scanning / Robocop

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

Line is too long (134/120)
@jstourac jstourac changed the title [Fix] the test for custom image import with duplicate name [Fix] the tests for custom image import Oct 11, 2024
@jstourac jstourac added the verified This PR has been tested with Jenkins label Oct 11, 2024
@jstourac jstourac marked this pull request as ready for review October 11, 2024 10:22
Copy link
Contributor

@lugi0 lugi0 left a comment

Choose a reason for hiding this comment

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

I think you could set some of the xpath variables as globals and reuse them across keywords, but this works too

[Tags] Tier1
... ODS-2470
... ExcludeOnDisconnected # Since we don't have internal image registry enabled there usually
... InternalImageRegistry # Requires internal image registry enabled
... ProductBug # https://issues.redhat.com/browse/RHOAIENG-1193
Copy link
Contributor

Choose a reason for hiding this comment

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

If the test has ProductBug, it will be run only in the known-issues quality gate. Beware RHOAIENG-1193 is closed as "Won't Do"

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, TBH, I was wondering whether we shouldn't remove the test at all... will consider it and maybe raise a separate issue.

[Tags] Tier1
... ODS-2470
... ExcludeOnDisconnected # Since we don't have internal image registry enabled there usually
Copy link
Contributor

@apodhrad apodhrad Oct 11, 2024

Choose a reason for hiding this comment

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

Hi @jstourac this is the matter of an option in our automation where the internal registry is disabled default. Moreover, the internal image registry can be enabled/disabled outside of disconnected automation (using oc command).

Copy link
Member Author

Choose a reason for hiding this comment

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

I know, Andrej. But the test isn't passing now anyway. Also, since the linked issue won't be fixed probably, the test will probably go away at all.

@jstourac
Copy link
Member Author

I think you could set some of the xpath variables as globals and reuse them across keywords, but this works too

You are right, Luca - I was considering it for the custom_image_name_record but it needs the image name to be resolved properly. At the same time - shortening it so it doesn't contain the image name looked a bit ugly for me. Thus I left it defined in each function... maybe we can restructure it in the future

@jstourac jstourac merged commit b245342 into red-hat-data-services:master Oct 11, 2024
8 checks passed
@jstourac jstourac deleted the fixImageDuplicate branch October 11, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) verified This PR has been tested with Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants