Skip to content

Commit

Permalink
Int test for the yum cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kokesak committed Jun 21, 2022
1 parent 01f5d0f commit 9a9b860
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ def test_smoke_basic(shell):
assert shell("convert2rhel --help").returncode == 0
assert shell("convert2rhel -h").returncode == 0
assert shell("convert2rhel <<< n").returncode != 0


def test_clean_cache(convert2rhel):
# Test that the yum clean is done before any other check that c2r does
with convert2rhel("--no-rpm-va --debug") as c2r:
c2r.expect("Prepare: Clean yum cache metadata")
c2r.expect("Cached yum metadata cleaned successfully.")
c2r.expect("Prepare: Perform basic system checks")
c2r.expect("Continue with the system conversion?")
c2r.sendline("n")
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ def test_prepare_system(shell):

assert shell("systemctl enable dnsmasq && systemctl restart dnsmasq").returncode == 0

os.environ["CONVERT2RHEL_UNSUPPORTED_INCOMPLETE_ROLLBACK"] = "1"
shell("rm -rf /etc/yum.repos.d/*")
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def test_convert_offline_systems(convert2rhel):
"""Test converting systems not connected to the Internet but requiring sub-mgr (e.g. managed by Satellite)."""

os.environ["CONVERT2RHEL_UNSUPPORTED_INCOMPLETE_ROLLBACK"] = "1"
os.environ["CONVERT2RHEL_UNSUPPORTED_SKIP_KERNEL_CURRENCY_CHECK"] = "1"
source_distro = platform.platform()

if "centos-8.4" in source_distro or "oracle-8.4" in source_distro:
Expand Down

0 comments on commit 9a9b860

Please sign in to comment.