From f2bd10bb1e2bb961360a1291270f5a34c3290f57 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 31 Jan 2022 02:32:39 +0100 Subject: nixos/tests/home-assistant: test loading lovelace modules --- nixos/tests/home-assistant.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nixos/tests') diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix index b7deb95b2c19..7635baba5fbb 100644 --- a/nixos/tests/home-assistant.nix +++ b/nixos/tests/home-assistant.nix @@ -43,6 +43,11 @@ in { psycopg2 ]; + # test loading lovelace modules + customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [ + mini-graph-card + ]; + config = { homeassistant = { name = "Home"; @@ -161,6 +166,10 @@ in { hass.wait_for_open_port(8123) hass.succeed("curl --fail http://localhost:8123/lovelace") + 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") + with subtest("Check that optional dependencies are in the PYTHONPATH"): env = get_unit_property("Environment") python_path = env.split("PYTHONPATH=")[1].split()[0] -- cgit 1.4.1