Skip to content

Commit

Permalink
Changed the id and what log for the unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-ang9 committed Dec 12, 2023
1 parent d29fe8a commit 4992b25
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def test_is_loaded_kernel_latest_skip_warnings(
"1",
"0",
"WARNING",
"UNSUPPORTED_SKIP_KERNEL_CURRENCY_CHECK_DETECTED_1",
"UNSUPPORTED_SKIP_KERNEL_CURRENCY_CHECK_DETECTED",
"Skipping the kernel currency check",
(
"Detected 'CONVERT2RHEL_SKIP_KERNEL_CURRENCY_CHECK' environment variable, we will skip the kernel-core comparison.\nBeware, this could leave your system in a broken state."
Expand Down Expand Up @@ -563,11 +563,6 @@ def test_is_loaded_kernel_latest_unsupported_skip_warning(
"environ",
{"CONVERT2RHEL_UNSUPPORTED_SKIP_KERNEL_CURRENCY_CHECK": unsupported_skip},
)
monkeypatch.setattr(
os,
"environ",
{"CONVERT2RHEL_SKIP_KERNEL_CURRENCY_CHECK": latest_skip},
)

expected_set = set(
(
Expand All @@ -582,7 +577,7 @@ def test_is_loaded_kernel_latest_unsupported_skip_warning(
)
)
is_loaded_kernel_latest_action.run()
assert unsupported_message in caplog.records[-1].message
assert unsupported_message in caplog.records[-2].message
assert expected_set.issuperset(is_loaded_kernel_latest_action.messages)
assert expected_set.issubset(is_loaded_kernel_latest_action.messages)

Expand Down

0 comments on commit 4992b25

Please sign in to comment.