mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-23 00:56:29 +00:00
Avoid using host system socket for systemd journald tests (#5858)
Similar to #5825, make sure we mock the systemd journal gateway socket for tests. This makes the test work on systems which have systemd-journal-gatewayd installed.
This commit is contained in:
parent
9915c21243
commit
9b0044edd6
@ -22,7 +22,11 @@ async def test_evaluation_unsupported(coresys: CoreSys):
|
||||
systemd_journal = EvaluateSystemdJournal(coresys)
|
||||
await coresys.core.set_state(CoreState.SETUP)
|
||||
|
||||
await systemd_journal()
|
||||
with patch("supervisor.host.logs.SYSTEMD_JOURNAL_GATEWAYD_SOCKET") as socket:
|
||||
socket.is_socket.return_value = False
|
||||
await coresys.host.logs.post_init()
|
||||
await systemd_journal()
|
||||
|
||||
assert systemd_journal.reason in coresys.resolution.unsupported
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user