summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-02-01 03:10:44 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-11-10 22:00:37 +0100
commit8108ce0a4f9af0d50100ddc9fcbbc8db704ca677 (patch)
tree0766037c8a83e57d614af2a9291d67b6ff1ddb60 /nixos
parentf2bd10bb1e2bb961360a1291270f5a34c3290f57 (diff)
downloadnixpkgs-8108ce0a4f9af0d50100ddc9fcbbc8db704ca677.tar
nixpkgs-8108ce0a4f9af0d50100ddc9fcbbc8db704ca677.tar.gz
nixpkgs-8108ce0a4f9af0d50100ddc9fcbbc8db704ca677.tar.bz2
nixpkgs-8108ce0a4f9af0d50100ddc9fcbbc8db704ca677.tar.lz
nixpkgs-8108ce0a4f9af0d50100ddc9fcbbc8db704ca677.tar.xz
nixpkgs-8108ce0a4f9af0d50100ddc9fcbbc8db704ca677.tar.zst
nixpkgs-8108ce0a4f9af0d50100ddc9fcbbc8db704ca677.zip
nixos/tests/home-assistant: test loading custom components
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/home-assistant.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix
index 7635baba5fb..0fa0d498738 100644
--- a/nixos/tests/home-assistant.nix
+++ b/nixos/tests/home-assistant.nix
@@ -43,6 +43,11 @@ in {
         psycopg2
       ];
 
+      # test loading custom components
+      customComponents = with pkgs.home-assistant-custom-components; [
+        prometheus-sensor
+      ];
+
       # test loading lovelace modules
       customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
         mini-graph-card
@@ -166,6 +171,10 @@ in {
         hass.wait_for_open_port(8123)
         hass.succeed("curl --fail http://localhost:8123/lovelace")
 
+    with subtest("Check that custom components get installed"):
+        hass.succeed("test -f ${configDir}/custom_components/prometheus_sensor/manifest.json")
+        hass.wait_until_succeeds("journalctl -u home-assistant.service | grep -q 'We found a custom integration prometheus_sensor which has not been tested by Home Assistant'")
+
     with subtest("Check that lovelace modules are referenced and fetchable"):
         hass.succeed("grep -q 'mini-graph-card-bundle.js' '${configDir}/ui-lovelace.yaml'")
         hass.succeed("curl --fail http://localhost:8123/local/nixos-lovelace-modules/mini-graph-card-bundle.js")