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

Install json-c from UBI 8 #494

Merged
merged 1 commit into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions convert2rhel/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ def download_rhsm_pkgs():
"dnf-plugin-subscription-manager",
"python3-syspurpose",
"python3-cloud-what",
"json-c.x86_64", # there's also an i686 version which we don't need
]
_download_rhsm_pkgs(pkgs_to_download, _UBI_8_REPO_PATH, _UBI_8_REPO_CONTENT)

Expand Down
7 changes: 4 additions & 3 deletions convert2rhel/unit_tests/subscription_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def __call__(self, pkgs_to_download, repo_path, repo_content):
@pytest.mark.parametrize(
(
"version",
"downloaded_pkgs",
"pkgs_to_download",
),
(
(
Expand Down Expand Up @@ -514,19 +514,20 @@ def __call__(self, pkgs_to_download, repo_path, repo_content):
"dnf-plugin-subscription-manager",
"python3-syspurpose",
"python3-cloud-what",
"json-c.x86_64",
)
),
),
),
)
def test_download_rhsm_pkgs(version, downloaded_pkgs, monkeypatch):
def test_download_rhsm_pkgs(version, pkgs_to_download, monkeypatch):
monkeypatch.setattr(system_info, "version", Version(*version))
monkeypatch.setattr(subscription, "_download_rhsm_pkgs", DownloadRHSMPkgsMocked())
monkeypatch.setattr(utils, "mkdir_p", DumbCallable())
subscription.download_rhsm_pkgs()

assert subscription._download_rhsm_pkgs.called == 1
assert frozenset(subscription._download_rhsm_pkgs.pkgs_to_download) == downloaded_pkgs
assert frozenset(subscription._download_rhsm_pkgs.pkgs_to_download) == pkgs_to_download


class TestUnregisteringSystem:
Expand Down