From 3dc3f019cff248525d38287eeeeb6df2a910b305 Mon Sep 17 00:00:00 2001 From: Simon Weber Date: Mon, 8 Jun 2020 00:09:50 +0200 Subject: nixos/zigbee2mqtt: add minimal test --- nixos/tests/zigbee2mqtt.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nixos/tests/zigbee2mqtt.nix (limited to 'nixos') diff --git a/nixos/tests/zigbee2mqtt.nix b/nixos/tests/zigbee2mqtt.nix new file mode 100644 index 0000000000000..b7bb21f9227af --- /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'\"" + ) + ''; + } +) -- cgit 1.4.1