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

Update test_positive_all_packages_update #12342

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

mstrlc
Copy link
Contributor

@mstrlc mstrlc commented Aug 24, 2023

Automate BZ 2073535 (satellite-maintain packages check-update fails when there are no packages to be updated).

@mstrlc mstrlc requested a review from jameerpathan111 August 24, 2023 14:50
@mstrlc mstrlc self-assigned this Aug 24, 2023
@mstrlc mstrlc changed the title add test_positive_fm_packages_check_update Add test_positive_fm_packages_check_update Aug 28, 2023
@mstrlc mstrlc force-pushed the f-m-automate-bz-2073535 branch from 178f5e1 to e22c025 Compare August 28, 2023 07:38
@mstrlc
Copy link
Contributor Author

mstrlc commented Aug 28, 2023

trigger: test-robottelo
pytest: tests/foreman/maintain/test_packages.py::test_positive_fm_packages_check_update

@mstrlc mstrlc added CherryPick PR needs CherryPick to previous branches 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 labels Aug 28, 2023
@mstrlc mstrlc marked this pull request as ready for review August 28, 2023 08:48
@mstrlc mstrlc requested a review from a team as a code owner August 28, 2023 08:48
Comment on lines 350 to 353
# Verify that there are no packages available for update and return code is 0
result = sat_maintain.cli.Packages.check_update()
assert 'FAIL' not in result.stdout
assert result.status == 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test scenario looks very identical to test_positive_fm_packages_update, can't we add this additional check of check-update when no update is available, into above test after package is updated?

@Griffin-Sullivan
Copy link
Contributor

I already added a test for this BZ when we got it on 6.13.z: #12009 is the PR and the bug for 6.13 is https://bugzilla.redhat.com/show_bug.cgi?id=2218656.

Copy link
Contributor

@lhellebr lhellebr left a comment

Choose a reason for hiding this comment

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

I agree with both Gaurav and Griffin and I'm in favor of closing this. Unless there's some additional value to this test that I'm not aware of.

But we may want to add @pytest.mark.include_capsule to Griffin's test.

@Griffin-Sullivan
Copy link
Contributor

I think a good resolution for this PR would be to add the capsule marker like @lhellebr said, and finish the work I started in the other PR that got merged. The test still doesn't completely verify that there are no updates available at the end. See #12009 (comment). @mstrlc if you don't want to add those updates yourself I'm willing to do it and push them here. Up to you.

@mstrlc
Copy link
Contributor Author

mstrlc commented Sep 25, 2023

Sure, I will look into it & update this test. Sorry, kinda forgot that I had it open.

@mstrlc mstrlc marked this pull request as draft October 2, 2023 14:04
@mstrlc mstrlc changed the title Add test_positive_fm_packages_check_update Update test_positive_all_packages_update Oct 5, 2023
@mstrlc
Copy link
Contributor Author

mstrlc commented Oct 12, 2023

Updated Griffin's test to add the capsule marker and a check if the output of the Packages.check_update() actually doesn't contain any packages, as the return code is same whether there are any to update or not.

@mstrlc mstrlc marked this pull request as ready for review October 12, 2023 18:27
@mstrlc
Copy link
Contributor Author

mstrlc commented Oct 16, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_packages.py::test_positive_all_packages_update

Copy link
Contributor

@Griffin-Sullivan Griffin-Sullivan left a comment

Choose a reason for hiding this comment

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

Works for me!

@Griffin-Sullivan Griffin-Sullivan merged commit b2d4f98 into SatelliteQE:master Oct 27, 2023
6 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 27, 2023
* add test_positive_fm_packages_check_update

* add capsule marker

* add regex to find packages to update

* remove duplicate test

* update regex to match if there's multiple packages

(cherry picked from commit b2d4f98)
github-actions bot pushed a commit that referenced this pull request Oct 27, 2023
* add test_positive_fm_packages_check_update

* add capsule marker

* add regex to find packages to update

* remove duplicate test

* update regex to match if there's multiple packages

(cherry picked from commit b2d4f98)
ogajduse pushed a commit that referenced this pull request Oct 31, 2023
* add test_positive_fm_packages_check_update

* add capsule marker

* add regex to find packages to update

* remove duplicate test

* update regex to match if there's multiple packages

(cherry picked from commit b2d4f98)
ogajduse pushed a commit that referenced this pull request Oct 31, 2023
* add test_positive_fm_packages_check_update

* add capsule marker

* add regex to find packages to update

* remove duplicate test

* update regex to match if there's multiple packages

(cherry picked from commit b2d4f98)
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
* add test_positive_fm_packages_check_update

* add capsule marker

* add regex to find packages to update

* remove duplicate test

* update regex to match if there's multiple packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants