mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-22 01:11:02 +03:00
nixos/tests/home-assistant: test ping via wake_on_lan component
Let the home-assistant instance linger around for 30s so it can run regular jobs and trigger more code paths that could result in errors.
This commit is contained in:
parent
d4061dcc6e
commit
d9ad2b40f1
1 changed files with 10 additions and 0 deletions
|
@ -49,6 +49,12 @@ in {
|
||||||
payload_on = "let_there_be_light";
|
payload_on = "let_there_be_light";
|
||||||
payload_off = "off";
|
payload_off = "off";
|
||||||
}];
|
}];
|
||||||
|
wake_on_lan = {};
|
||||||
|
switch = [{
|
||||||
|
platform = "wake_on_lan";
|
||||||
|
mac = "00:11:22:33:44:55";
|
||||||
|
host = "127.0.0.1";
|
||||||
|
}];
|
||||||
# tests component-based capability assignment (CAP_NET_BIND_SERVICE)
|
# tests component-based capability assignment (CAP_NET_BIND_SERVICE)
|
||||||
emulated_hue = {
|
emulated_hue = {
|
||||||
host_ip = "127.0.0.1";
|
host_ip = "127.0.0.1";
|
||||||
|
@ -99,6 +105,10 @@ in {
|
||||||
print("\n### home-assistant.log ###\n")
|
print("\n### home-assistant.log ###\n")
|
||||||
print(output_log + "\n")
|
print(output_log + "\n")
|
||||||
|
|
||||||
|
# wait for home-assistant to fully boot
|
||||||
|
hass.sleep(30)
|
||||||
|
hass.wait_for_unit("home-assistant.service")
|
||||||
|
|
||||||
with subtest("Check that no errors were logged"):
|
with subtest("Check that no errors were logged"):
|
||||||
assert "ERROR" not in output_log
|
assert "ERROR" not in output_log
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue