mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
nixos/tests/home-assistant: test loading lovelace modules
This commit is contained in:
parent
f30192ae6f
commit
f2bd10bb1e
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue