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

Test Case check for correct component images #1965

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asanzgom
Copy link
Contributor

New Test Case to check for correct component images



*** Test Cases ***
Check For Correct Component Images

Check warning

Code scanning / Robocop

Test case '{{ test_name }}' is too long ({{ test_length }}/{{ allowed_length }}) Warning test

Test case 'Check For Correct Component Images' is too long (53/20)


*** Test Cases ***
Check For Correct Component Images

Check warning

Code scanning / Robocop

Test case '{{ test_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) Warning test

Test case 'Check For Correct Component Images' has too many keywords inside (13/10)
[Documentation] The purpose is to enforce the check of correct component images on their deployments.
[Tags] Operator RHOAIENG-12576
FOR ${cmp} IN @{COMPONENTS}
${rc} ${managementState}= Run And Return Rc And Output

Check notice

Code scanning / Robocop

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

Variable '${rc}' is assigned but not used
Log To Console IMAGE ON CSV IS ${csv_image}

# Check for regex to see whether it is pointing mistream or downstream
${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

# Check for regex to see whether it is pointing mistream or downstream
${rc} ${out}= Run And Return Rc And Output
... oc get Deployment ${deployment_name} -n ${APPLICATIONS_NAMESPACE} -o jsonpath='{.spec.template.spec.containers[?(@.images=="${csv_image}")]}'

Check warning

Code scanning / Robocop

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

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

Robot Results

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

@asanzgom
Copy link
Contributor Author

Triggered /rhods-ci-pr-test/3398

Check Image On Csv And Deployment
... odh_notebook_controller_image
... odh-notebook-controller-manager
Check Image On Csv And Deployment
Copy link
Contributor

Choose a reason for hiding this comment

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

cant we do on a different way to avoid a statement per component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, robot framework has limitations on this. I was investigating

Copy link
Contributor

Choose a reason for hiding this comment

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

we can try to have a variable to map the component name to the image name, like this:

Copy link

sonarcloud bot commented Oct 25, 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.

2 participants