Skip to content

Commit 4ce634d

Browse files
twangboydwoz
authored andcommitted
Fix test_yumpkg_group_installed_with_repo_options for dnf5
yumpkg.group_info() builds a different CLI invocation for dnf5 ("group", "info", name as three tokens) than for legacy yum/dnf ("groupinfo", name), but the test hardcoded the legacy form. On the new fedora-43 CI runner (which has a real dnf5 binary, so yumpkg._yum() resolves to "dnf5"), this made all 4 parametrized cases fail with AssertionError: expected call not found. Mirror the same _yum() == "dnf5" branch used in yumpkg.group_info so the expected command matches whichever package manager is actually detected.
1 parent 972e0d5 commit 4ce634d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/pytests/unit/states/test_pkg.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,10 @@ def test_yumpkg_group_installed_with_repo_options(
15091509
assert not ret["changes"]
15101510
expected = [yumpkg._yum(), "--quiet"]
15111511
expected.extend(expected_cli_options)
1512-
expected.extend(("groupinfo", name))
1512+
if yumpkg._yum() == "dnf5":
1513+
expected.extend(("group", "info", name))
1514+
else:
1515+
expected.extend(("groupinfo", name))
15131516
run_stdout.assert_called_once_with(
15141517
expected,
15151518
output_loglevel="trace",

0 commit comments

Comments
 (0)