1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2025-12-20 02:18:37 +00:00

Add test for no failed Systemd units (#3583)

Test that systemctl reports no failed units at the end of the basic test.
This commit is contained in:
Jan Čermák
2024-09-11 23:30:01 +02:00
committed by GitHub
parent e3bbe2003f
commit 5d164b12d1

View File

@@ -71,3 +71,8 @@ def test_supervisor_logs(shell):
def test_systemctl_status(shell): def test_systemctl_status(shell):
output = shell.run_check("systemctl --no-pager -l status -a || true") output = shell.run_check("systemctl --no-pager -l status -a || true")
_LOGGER.info("%s", "\n".join(output)) _LOGGER.info("%s", "\n".join(output))
@pytest.mark.dependency(depends=["test_init"])
def test_systemctl_check_no_failed(shell):
output = shell.run_check("systemctl --no-pager -l list-units --state=failed")
assert "0 loaded units listed." in output, f"Some units failed:\n{"\n".join(output)}"