summary refs log tree commit diff
path: root/nixos/tests/home-assistant.nix
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-01-25 18:30:43 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-01-25 18:30:45 +0100
commitd9ad2b40f14cf5c8e668e7efb51de5c4a987a371 (patch)
treea5ef3751905a416fe3c11b33902b6c34c99729a5 /nixos/tests/home-assistant.nix
parentd4061dcc6e429510c3ac4e1fc3da34325eed8096 (diff)
downloadnixpkgs-d9ad2b40f14cf5c8e668e7efb51de5c4a987a371.tar
nixpkgs-d9ad2b40f14cf5c8e668e7efb51de5c4a987a371.tar.gz
nixpkgs-d9ad2b40f14cf5c8e668e7efb51de5c4a987a371.tar.bz2
nixpkgs-d9ad2b40f14cf5c8e668e7efb51de5c4a987a371.tar.lz
nixpkgs-d9ad2b40f14cf5c8e668e7efb51de5c4a987a371.tar.xz
nixpkgs-d9ad2b40f14cf5c8e668e7efb51de5c4a987a371.tar.zst
nixpkgs-d9ad2b40f14cf5c8e668e7efb51de5c4a987a371.zip
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.
Diffstat (limited to 'nixos/tests/home-assistant.nix')
-rw-r--r--nixos/tests/home-assistant.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix
index 1ab5755863f..5b1c07c92da 100644
--- a/nixos/tests/home-assistant.nix
+++ b/nixos/tests/home-assistant.nix
@@ -49,6 +49,12 @@ in {
           payload_on = "let_there_be_light";
           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)
         emulated_hue = {
           host_ip = "127.0.0.1";
@@ -99,6 +105,10 @@ in {
         print("\n### home-assistant.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"):
         assert "ERROR" not in output_log