nixos/zigbee2mqtt: add minimal test
commit3dc3f019cff248525d38287eeeeb6df2a910b305
authorSimon Weber <sweber2342@gmail.com>
dateMon 8 Jun 2020, 00:09 (6 years ago)
parent1af8759
nixos/tests/zigbee2mqtt.nixnew file+19
@@ -0,0 +1,19 @@
1+import ./make-test-python.nix ({ pkgs, ... }:
2+
3+ {
4+ machine = { pkgs, ... }:
5+ {
6+ services.zigbee2mqtt = {
7+ enable = true;
8+ };
9+ };
10+
11+ testScript = ''
12+ machine.wait_for_unit("zigbee2mqtt.service")
13+ machine.wait_until_fails("systemctl status zigbee2mqtt.service")
14+ machine.succeed(
15+ "journalctl -eu zigbee2mqtt | grep \"Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0'\""
16+ )
17+ '';
18+ }
19+)