diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix index 47902fa4e134..5ff142b08d7a 100644 --- a/nixos/tests/home-assistant.nix +++ b/nixos/tests/home-assistant.nix @@ -206,21 +206,21 @@ in { with subtest("Check extra components are considered in systemd unit hardening"): hass.succeed("systemctl show -p DeviceAllow home-assistant.service | grep -q char-ttyUSB") - with subtest("Check service reloads when configuration changes"): + with subtest("Check service restart from SIGHUP"): pid = hass.succeed("systemctl show --property=MainPID home-assistant.service") cursor = get_journal_cursor() hass.succeed("${system}/specialisation/differentName/bin/switch-to-configuration test") - new_pid = hass.succeed("systemctl show --property=MainPID home-assistant.service") - assert pid == new_pid, "The PID of the process should not change between process reloads" wait_for_homeassistant(cursor) + new_pid = hass.succeed("systemctl show --property=MainPID home-assistant.service") + assert pid != new_pid, "The PID of the process must change after sending SIGHUP" with subtest("Check service restarts when dependencies change"): pid = new_pid cursor = get_journal_cursor() hass.succeed("${system}/specialisation/newFeature/bin/switch-to-configuration test") - new_pid = hass.succeed("systemctl show --property=MainPID home-assistant.service") - assert pid != new_pid, "The PID of the process should change when its PYTHONPATH changess" wait_for_homeassistant(cursor) + new_pid = hass.succeed("systemctl show --property=MainPID home-assistant.service") + assert pid != new_pid, "The PID of the process must change when its PYTHONPATH changess" with subtest("Check that new components get setup after restart"): journal = get_journal_since(cursor)