Commit Graph

52 Commits

Author SHA1 Message Date
Martin Weinelt
c85cecedf1
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.
2023-11-10 22:00:38 +01:00
Martin Weinelt
8108ce0a4f
nixos/tests/home-assistant: test loading custom components 2023-11-10 22:00:37 +01:00
Martin Weinelt
f2bd10bb1e
nixos/tests/home-assistant: test loading lovelace modules 2023-11-10 22:00:37 +01:00
K900
163a50a5e1
nixos/tests/home-assistant: replace ensureUsers with custom setup script for now
(cherry picked from commit 30d70bf605)
2023-11-04 22:11:34 +01:00
Martin Weinelt
4540dad9e7
nixos/tests/home-assistant: Drop esphome, fix post-restart expectation
Mentioning esphome in the config is now causing an error. Check for the
backup module post-restart, not esphome.
2023-06-07 23:55:51 +02:00
Martin Weinelt
ee68357205
nixos/tests/home-assistant: Don't test matter
It is affected by the OpenSSL 1.1 EOL and removing it makes hydra build
this test again.
2023-05-20 00:31:07 +02:00
Martin Weinelt
9ebb469697
nixosTests.home-assistant: Test more components 2023-04-28 21:37:52 +02:00
Martin Weinelt
f98462a27d
nixos/tests/home-assistant: Resolve deprecation warning
> trace: warning: Module argument `nodes.hass.config` is deprecated. Use `nodes.hass` instead.
2023-02-20 18:37:20 +01:00
Martin Weinelt
9bf8744a73
nixos/tests/home-assistant: Check dependencies arrive in the PYTHONPATH
Both extraPackages and derived packages from extraComponents should
be present in the units PYTHONPATH environment variable.
2023-02-20 18:37:20 +01:00
Martin Weinelt
ba3f159cc8
nixos/tests/home-assistant: Overhaul and refactor
Prepare the tests for a change in dependency handling, by not relying on
bespoke files dropped into the package output.

Instead we now check the journal log for whether a configured component
was setup, once for the initial specialisation another time for the one
introducing esphome configuration.

Also improve abstractions for getting journal data relative to a cursor
and generally make a few things more concise.
2023-02-20 18:37:19 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Martin Weinelt
0ae92922a1
nixos/tests/home-assistant: improve reload/restart test cases
Wait until home-assistant is fully reloaded or restarted to spot
possible errors during startup.

Swap out bluetooth_tracker for esphome, since the bluetooth tracker
causes errors, when it does not find a bluetooth device.

Drop mosquitto from the environment. It wasn't used since the 2022.3.0
release when MQTT stopped being configurable from the YAML config.
2022-07-14 02:26:54 +02:00
Martin Weinelt
d26a6e377d
nixos/tests/home-assistant: stop printing log
With multiple specialization changes this isn't very helpful anymore,
but no biggie since we check the log for errors anyway and the log is
not too verbose anyway.
2022-06-22 17:02:48 +02:00
Andreas Rammhold
cfbcf381c2
nixos/home-assistant: reload the daemon when configuration changed
Reload the service when configuration changes. This means that we don't
have a potentially slow startup for every small configuration change.
2022-06-22 16:20:11 +02:00
Martin Weinelt
417419a5c9 nixos/tests/home-assistant: assert regex match
Fixes type checking done against the test driver.
2022-06-03 18:56:11 -07:00
Martin Weinelt
9c465fc4e6
nixos/tests/home-assistant: drop mqtt tests
With Home Assistant 2022.3.0 the MQTT configuration cannot be done
declaratively anymore, so this test scenario has been rendered moot.
2022-03-05 02:06:50 +01:00
Martin Weinelt
32bd0aafab
nixos/tests/home-assistant: test package and components passing
There are now multiple combinations of how one can pass either
extraPackages or extraComponents. We now test those passed directly to
the package via an override, and those passed indirectly via the module,
that ultimately results in a second override to the package.
2022-02-15 23:41:52 +01:00
Martin Weinelt
191fb818e6
nixos/tests/home-assistant: test module-based package loading
Passing psycopg2 for PostgreSQL support in the recorder component is one
of the more popular use cases to pass an extra package.
2022-02-15 23:41:50 +01:00
Martin Weinelt
4b47eaee4d
nixos/tests/home-assistant: test module-based component loading 2022-02-15 23:41:49 +01:00
Martin Weinelt
05640ec19d
nixos/tests/home-assistant: add comments & reformat 2022-02-15 23:15:17 +01:00
Martin Weinelt
d9ad2b40f1
nixos/tests/home-assistant: test ping via wake_on_lan component
Let the home-assistant instance linger around for 30s so it can run
regular jobs and trigger more code paths that could result in errors.
2022-01-25 18:30:45 +01:00
Martin Weinelt
9e234eba80 nixos/tests/home-assistant: test hardening with extraComponents 2021-12-01 01:19:01 +01:00
pennae
56d0b5cd6a nixos/mosquitto: rewrite the module
mosquitto needs a lot of attention concerning its config because it doesn't
parse it very well, often ignoring trailing parts of lines, duplicated config
keys, or just looking back way further in the file to associated config keys
with previously defined items than might be expected.

this replaces the mosquitto module completely. we now have a hierarchical config
that flattens out to the mosquitto format (hopefully) without introducing spooky
action at a distance.
2021-10-22 16:06:55 -04:00
Robert Schütz
a3d043387f nixos/tests/home-assistant: don't test package
The modules overrides extraComponents which leads to a costly rebuild of
the home-assistant package with all tests.  Make it less costly by not
running the tests, as does the default for the package option.  The
package's tests are already run by ofborg on every pull request as well
as by Hydra when building home-assistant.
2021-06-28 14:34:18 +02:00
Martin Weinelt
36659d1efa
nixos/home-assistant: update hardening
This makes access to serial devices contingent on using certain
components and restricts the default setup even further.
2021-06-16 21:31:24 +02:00
Martin Weinelt
1dbb60f562
nixos/tests/home-assistant: update maintainership to home-assistant team 2021-05-03 00:21:25 +02:00
Martin Weinelt
8ab7fc1107
nixos/tests/home-assistant: test capability passing
Configures the emulated_hue component and expects CAP_NET_BIND_SERVICE
to be passed in order to be able to bind to 80/tcp.

Also print the systemd security analysis, so we can spot changes more
quickly.
2021-05-03 00:21:25 +02:00
Martin Weinelt
75047877e3
nixos/tests/home-assistant: fix mosquitto configuration
Things broke after mosquitto was upgraded in f07c81b.
2021-04-09 13:51:24 +02:00
Martin Weinelt
1050f1487b
nixos/home-assistant: disable tests on the package by default
We are running over 6000 tests by now and they take around 5 minutes
on faster machines and tests alot of components that endusers will not
actually be using. It is sufficient if we run them on package upgrades
and in the passthrough test.
2021-03-06 03:02:06 +01:00
Dominik Xaver Hörl
25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00
Martin Weinelt
1093962cf0
nixos/tests/home-assistant: replace internal mqtt broker with mosquitto
The internal broker was deprecated since 0.92.0 and removed in 0.112.0.
2020-07-07 01:43:44 +02:00
Jörg Thalheim
a68c7e0fa7
nixos/home-assistant: fix tests 2020-06-21 10:58:29 +01:00
Martin Weinelt
feeec71609
home-assistant: 0.109.6 → 0.110.0 2020-05-21 00:01:24 +02:00
Oleksii Filonenko
25b75b8fb5
nixosTests.home-assistant: port to python 2020-01-09 10:39:50 +00:00
Robert Schütz
149f580412
home-assistant: 0.89.2 -> 0.90.1 (#58017)
https://www.home-assistant.io/blog/2019/03/20/release-90/
2019-03-24 19:45:35 +01:00
Robert Schütz
3382d93982 home-assistant-cli: 0.5.0 -> 0.6.0 2019-02-21 14:03:35 +01:00
Peter Hoeg
7003a28916
Merge pull request #54541 from dotlambda/home-assistant-0.86
home-assistant: 0.85.1 -> 0.86.4
2019-02-06 09:02:28 +08:00
Robert Schütz
f85453f060 nixos/home-assistant: add configWritable option 2019-02-03 13:08:11 +01:00
Robert Schütz
cfd556fd4a home-assistant-cli: 0.3.0 -> 0.4.2 2019-01-29 23:57:12 +01:00
Robert Schütz
f908f6c982 nixos/home-assistant: don't run json2yaml at every start 2019-01-29 08:56:51 +01:00
Robert Schütz
7cc7c5374c nixos/home-assistant: add lovelaceConfig option 2019-01-29 08:56:51 +01:00
Robert Schütz
52b1973283 home-assistant-cli: init at 0.3.0 2018-12-19 15:54:28 +01:00
Robert Schütz
b63bb15612 home-assistant: 0.82.1 -> 0.83.3 2018-12-06 14:59:27 +01:00
Robert Schütz
6017fdfe91 nixos/tests/home-assistant: no longer ignore "Timer got out of sync" error
That error message was removed in https://github.com/home-assistant/home-assistant/pull/17398.
2018-10-29 13:30:06 +01:00
Robert Schütz
33be3c4630 home-assistant: 0.75.2 -> 0.76.1
Also simplify the way overrides are defined for better readability
and use the opportunity to introduce a packageOverrides option.
2018-08-21 19:26:54 +02:00
volth
2e979e8ceb [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
Robert Schütz
e3a7d55d3e
nixos/tests/home-assistant: ignore "Timer got out of sync" error (#40735) 2018-05-18 23:06:25 +02:00
Robert Schütz
da58afdd68 nixos/tests/home-assistant: print log before failing 2018-05-10 13:12:35 +02:00
Peter Hoeg
b886faa6b6 home-assistant: use remarshal to convert configuration to YAML
HA doesn't mind the configuration being JSON instead of YAML but since YAML is
the official language, use that as it allows users to easily exchange config
data with other parties in the community.
2018-04-23 16:53:13 +08:00
Robert Schütz
772b72a8d7 nixos/home-assistant: test MQTT configuration 2018-02-17 20:43:55 +01:00