-
Notifications
You must be signed in to change notification settings - Fork 87
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
[RHELC-1164] Update RHSM custom facts during analysis #1043
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/integration/tier0/non-destructive/rhsm-facts/main.fmf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,20 @@ | ||||||
summary+: | | ||||||
RHSM facts update when in analysis mode | ||||||
description+: | | ||||||
Verify that the subscription-manager facts command is called after the | ||||||
analysis is done (either succeeding or failling). | ||||||
|
||||||
/rhsm_facts_update_in_analysis: | ||||||
summary+: | | ||||||
RHSM facts update after analysis | ||||||
description+: | | ||||||
This test verifies that the RHSM facts are uploaded when running | ||||||
convert2rhel with analysis option. | ||||||
tag+: | ||||||
- test-rhsm-facts-called-in-analysis | ||||||
test: | | ||||||
pytest -svv -m test_rhsm_facts_called_in_analysis | ||||||
adjust+: | ||||||
- enabled: false | ||||||
when: distro == oracle-7, oracle-8 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The filtering calls the startswith() method, I believe, so no need to include both. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, thanks! |
||||||
because: RHSM package not available in oracle repos |
15 changes: 15 additions & 0 deletions
15
tests/integration/tier0/non-destructive/rhsm-facts/test_rhsm_facts_update_analysis.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.test_rhsm_facts_called_in_analysis | ||
def test_rhsm_facts_called_after_analysis(convert2rhel, pre_registered): | ||
""" | ||
Verify that the RHSM custom facts are uploaded after the analysis is done. | ||
""" | ||
with convert2rhel("analyze -y --debug") as c2r: | ||
# Verify that the analysis report is printed | ||
c2r.expect("Updating RHSM custom facts collected during the conversion.", timeout=600) | ||
c2r.expect("RHSM custom facts uploaded successfully.", timeout=600) | ||
|
||
# The analysis should exit with 0, if it finishes successfully | ||
assert c2r.exitstatus == 0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just duplicating the summary and description from the root of the path in the file.
Could be consolidated, I wouldn't block the merge on this though.