From 4992b256d99949ab238327270eba6cde3469dec4 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Thu, 7 Dec 2023 08:39:38 -0500 Subject: [PATCH] Changed the id and what log for the unit test --- .../system_checks/is_loaded_kernel_latest_test.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/convert2rhel/unit_tests/actions/system_checks/is_loaded_kernel_latest_test.py b/convert2rhel/unit_tests/actions/system_checks/is_loaded_kernel_latest_test.py index 4b6ea4617e..513139e170 100644 --- a/convert2rhel/unit_tests/actions/system_checks/is_loaded_kernel_latest_test.py +++ b/convert2rhel/unit_tests/actions/system_checks/is_loaded_kernel_latest_test.py @@ -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." @@ -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( ( @@ -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)