nixos/zigbee2mqtt: add minimal test
This commit is contained in:
parent
1af8759693
commit
3dc3f019cf
19
nixos/tests/zigbee2mqtt.nix
Normal file
19
nixos/tests/zigbee2mqtt.nix
Normal file
|
@ -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'\""
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
Loading…
Reference in a new issue