aboutsummaryrefslogtreecommitdiff
path: root/nixos/tests/zigbee2mqtt.nix
diff options
context:
space:
mode:
authorSimon Weber <sweber2342@gmail.com>2020-06-08 00:09:50 +0200
committerSimon Weber <sweber2342@gmail.com>2020-07-20 21:48:14 +0200
commit3dc3f019cff248525d38287eeeeb6df2a910b305 (patch)
tree11f547f919d50d033b053b98a4200a0d42ecadb4 /nixos/tests/zigbee2mqtt.nix
parent1af8759693aa0e37e81597e4e410a23d709a7a41 (diff)
nixos/zigbee2mqtt: add minimal test
Diffstat (limited to 'nixos/tests/zigbee2mqtt.nix')
-rw-r--r--nixos/tests/zigbee2mqtt.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tests/zigbee2mqtt.nix b/nixos/tests/zigbee2mqtt.nix
new file mode 100644
index 000000000000..b7bb21f9227a
--- /dev/null
+++ b/nixos/tests/zigbee2mqtt.nix
@@ -0,0 +1,19 @@
+import ./make-test-python.nix ({ pkgs, ... }:
+
+ {
+ machine = { pkgs, ... }:
+ {
+ services.zigbee2mqtt = {
+ enable = true;
+ };
+ };
+
+ testScript = ''
+ machine.wait_for_unit("zigbee2mqtt.service")
+ machine.wait_until_fails("systemctl status zigbee2mqtt.service")
+ machine.succeed(
+ "journalctl -eu zigbee2mqtt | grep \"Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0'\""
+ )
+ '';
+ }
+)