-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the excluded kernel test destructive (#1346)
- Loading branch information
Showing
7 changed files
with
78 additions
and
40 deletions.
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
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
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
13 changes: 13 additions & 0 deletions
13
tests/integration/tier1/destructive/yum-conf-exclude-packages/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,13 @@ | ||
summary+: | | ||
Exclude kernel* and redhat-release-server packages in yum conf | ||
description+: | | ||
This tests verifies that it is possible to do a full conversion when | ||
the all kernel packages (kernel*) and redhat-release-server is set to be excluded | ||
in the yum configuration file. | ||
|
||
tag+: | ||
- kernel | ||
link: | ||
- verifies: https://issues.redhat.com/browse/RHELC-774 | ||
/yum_conf_exclude_packages: | ||
test: pytest -m test_yum_conf_exclude_packages |
25 changes: 25 additions & 0 deletions
25
...integration/tier1/destructive/yum-conf-exclude-packages/test_yum_conf_exclude_packages.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,25 @@ | ||
import pytest | ||
|
||
from conftest import TEST_VARS | ||
|
||
|
||
@pytest.mark.parametrize("yum_conf_exclude", [["kernel*", "redhat-release-server"]], indirect=True) | ||
def test_yum_conf_exclude_packages(convert2rhel, yum_conf_exclude): | ||
""" | ||
Verify, the conversion does not raise: | ||
'Could not find any kernel from repositories to compare against the loaded kernel.' | ||
When `exclude=kernel kernel-core redhat-release-server` is defined in yum.conf | ||
Verify IS_LOADED_KERNEL_LATEST has succeeded is raised. | ||
Reference ticket: https://issues.redhat.com/browse/RHELC-774 | ||
""" | ||
with convert2rhel( | ||
"-y --serverurl {} --username {} --password {} --pool {} --debug".format( | ||
TEST_VARS["RHSM_SERVER_URL"], | ||
TEST_VARS["RHSM_USERNAME"], | ||
TEST_VARS["RHSM_PASSWORD"], | ||
TEST_VARS["RHSM_POOL"], | ||
) | ||
) as c2r: | ||
c2r.expect("IS_LOADED_KERNEL_LATEST has succeeded") | ||
|
||
assert c2r.exitstatus == 0 |