nixos/tests/home-assistant: test custom things cleanup
Make sure we properly remove custom components and custom lovelace modules, when they're not configured anymore.
This commit is contained in:
parent
8108ce0a4f
commit
c85cecedf1
@ -124,6 +124,14 @@ in {
|
||||
inheritParentConfig = true;
|
||||
configuration.services.home-assistant.config.backup = {};
|
||||
};
|
||||
|
||||
specialisation.removeCustomThings = {
|
||||
inheritParentConfig = true;
|
||||
configuration.services.home-assistant = {
|
||||
customComponents = lib.mkForce [];
|
||||
customLovelaceModules = lib.mkForce [];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: let
|
||||
@ -218,6 +226,13 @@ in {
|
||||
for domain in ["backup"]:
|
||||
assert f"Setup of domain {domain} took" in journal, f"{domain} setup missing"
|
||||
|
||||
with subtest("Check custom components and custom lovelace modules get removed"):
|
||||
cursor = get_journal_cursor()
|
||||
hass.succeed("${system}/specialisation/removeCustomThings/bin/switch-to-configuration test")
|
||||
hass.fail("grep -q 'mini-graph-card-bundle.js' '${configDir}/ui-lovelace.yaml'")
|
||||
hass.fail("test -f ${configDir}/custom_components/prometheus_sensor/manifest.json")
|
||||
wait_for_homeassistant(cursor)
|
||||
|
||||
with subtest("Check that no errors were logged"):
|
||||
hass.fail("journalctl -u home-assistant -o cat | grep -q ERROR")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user