File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,12 @@ def ensure_compatibility_of_kmods():
100100 )
101101 # TODO logger.critical("message %s, %s", "what should be under s")
102102 # doesn't work. We have `%s` as output instead. Make it work
103- logger .warning (
103+ logger .critical (
104104 (
105105 "The following kernel modules are not "
106- "supported in RHEL:\n {kmods}"
106+ "supported in RHEL:\n {kmods}\n "
107+ "Uninstall or disable them and run convert2rhel "
108+ "again to continue with the conversion."
107109 ).format (kmods = not_supported_kmods )
108110 )
109111 else :
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ def test_pre_ponr_checks(monkeypatch):
151151 ),
152152 (
153153 HOST_MODULES_STUB_BAD ,
154- None ,
154+ SystemExit ,
155155 None ,
156156 "Kernel modules are compatible" ,
157157 ),
@@ -197,17 +197,20 @@ def test_ensure_compatibility_of_kmods(
197197 "unsupported_pkg" ,
198198 "msg_in_logs" ,
199199 "msg_not_in_logs" ,
200+ "exception" ,
200201 ),
201202 (
202203 (
203204 "/lib/modules/3.10.0-1160.6.1/kernel/drivers/input/ff-memless.ko.xz\n " ,
204205 "Kernel modules are compatible" ,
205206 "The following kernel modules are not supported in RHEL" ,
207+ None ,
206208 ),
207209 (
208210 "/lib/modules/3.10.0-1160.6.1/kernel/drivers/input/other.ko.xz\n " ,
209211 "The following kernel modules are not supported in RHEL" ,
210212 None ,
213+ SystemExit ,
211214 ),
212215 ),
213216)
@@ -218,6 +221,7 @@ def test_ensure_compatibility_of_kmods_excluded(
218221 unsupported_pkg ,
219222 msg_in_logs ,
220223 msg_not_in_logs ,
224+ exception ,
221225):
222226 get_unsupported_kmods_mocked = mock .Mock (
223227 wraps = checks .get_unsupported_kmods
@@ -240,7 +244,11 @@ def test_ensure_compatibility_of_kmods_excluded(
240244 "get_unsupported_kmods" ,
241245 value = get_unsupported_kmods_mocked ,
242246 )
243- ensure_compatibility_of_kmods ()
247+ if exception :
248+ with pytest .raises (exception ):
249+ ensure_compatibility_of_kmods ()
250+ else :
251+ ensure_compatibility_of_kmods ()
244252 get_unsupported_kmods_mocked .assert_called_with (
245253 # host kmods
246254 set (
You can’t perform that action at this time.
0 commit comments