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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,3 +71,8 @@ def test_supervisor_logs(shell):
def test_systemctl_status(shell):
output = shell.run_check("systemctl --no-pager -l status -a || true")
_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)}"