nixos/tests/home-assistant: test loading lovelace modules
This commit is contained in:
parent
f30192ae6f
commit
f2bd10bb1e
@ -43,6 +43,11 @@ in {
|
|||||||
psycopg2
|
psycopg2
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# test loading lovelace modules
|
||||||
|
customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
|
||||||
|
mini-graph-card
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
homeassistant = {
|
homeassistant = {
|
||||||
name = "Home";
|
name = "Home";
|
||||||
@ -161,6 +166,10 @@ in {
|
|||||||
hass.wait_for_open_port(8123)
|
hass.wait_for_open_port(8123)
|
||||||
hass.succeed("curl --fail http://localhost:8123/lovelace")
|
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"):
|
with subtest("Check that optional dependencies are in the PYTHONPATH"):
|
||||||
env = get_unit_property("Environment")
|
env = get_unit_property("Environment")
|
||||||
python_path = env.split("PYTHONPATH=")[1].split()[0]
|
python_path = env.split("PYTHONPATH=")[1].split()[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user