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

Add a test case for metadata repair on capsule complete sync #16835

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

vsedmik
Copy link
Contributor

@vsedmik vsedmik commented Nov 1, 2024

Problem Statement

We are missing coverage for the customer case listed bellow

Solution

This PR proposes a test case to ensure that the complete capsule sync repairs the repository metadata.

Related Issues

https://issues.redhat.com/browse/SAT-28575

PRT test Cases example

Requires Katello/katello#11168

trigger: test-robottelo
pytest: tests/foreman/api/test_capsulecontent.py -k complete_sync_fixes_metadata
Katello:
  katello: 11168

@vsedmik vsedmik added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Nov 1, 2024
@vsedmik vsedmik self-assigned this Nov 1, 2024
@vsedmik vsedmik requested a review from a team as a code owner November 1, 2024 17:55
@vsedmik
Copy link
Contributor Author

vsedmik commented Nov 1, 2024

trigger: test-robottelo
pytest: tests/foreman/api/test_capsulecontent.py -k complete_sync_fixes_metadata
Katello:
  katello: 11168

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9198
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_capsulecontent.py -k complete_sync_fixes_metadata --external-logging
Test Result : ========== 1 passed, 25 deselected, 39 warnings in 2238.96s (0:37:18) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 1, 2024
Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

@vsedmik would a good 2nd test case after the repair and metadata have been verified to have a client that is connected to the capsule, try a yum repolist to verify it can pull down the metadata correctly? Or would that be to hard to mock out?

@chris1984 chris1984 requested a review from a team November 1, 2024 18:53
@vsedmik
Copy link
Contributor Author

vsedmik commented Nov 1, 2024

@vsedmik would a good 2nd test case after the repair and metadata have been verified to have a client that is connected to the capsule, try a yum repolist to verify it can pull down the metadata correctly? Or would that be to hard to mock out?

@chris1984 Actually we could extend this one to use the rhel_contenthost, register it via AK to the capsule and dnf repolist/update/install/whatever there. No mocking, just one extra VM used inside this test case. I was thinking if it's worth it and thought the assertion for restored artifacts would be enough. But if you think it's worth it we can do it.

@chris1984
Copy link
Member

@vsedmik would a good 2nd test case after the repair and metadata have been verified to have a client that is connected to the capsule, try a yum repolist to verify it can pull down the metadata correctly? Or would that be to hard to mock out?

@chris1984 Actually we could extend this one to use the rhel_contenthost, register it via AK to the capsule and dnf repolist/update/install/whatever there. No mocking, just one extra VM used inside this test case. I was thinking if it's worth it and thought the assertion for restored artifacts would be enough. But if you think it's worth it we can do it.

That would be awesome if you could @vsedmik and it's not too much work.

@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 5, 2024
@vsedmik
Copy link
Contributor Author

vsedmik commented Nov 5, 2024

trigger: test-robottelo
pytest: tests/foreman/api/test_capsulecontent.py -k complete_sync_fixes_metadata
Katello:
  katello: 11168

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9248
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_capsulecontent.py -k complete_sync_fixes_metadata --external-logging
Test Result : ========== 1 passed, 25 deselected, 39 warnings in 2071.03s (0:34:31) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 5, 2024
Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

Looks great and thanks for updating the test @vsedmik

@chris1984 chris1984 merged commit bac3bc3 into SatelliteQE:master Nov 5, 2024
9 checks passed
@vsedmik vsedmik deleted the caps-fix-metadata branch November 6, 2024 09:52
damoore044 pushed a commit to damoore044/robottelo that referenced this pull request Nov 8, 2024
…teQE#16835)

* Add a test case for metadata repair on capsule complete sync

* Harden the test case with contenthost actions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants