mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
nixos/tests/home-assistant: test loading custom components
This commit is contained in:
parent
f2bd10bb1e
commit
8108ce0a4f
1 changed files with 9 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue