2021-04-30 01:45:57 +02:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
2020-06-08 00:09:50 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
machine = { pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.zigbee2mqtt = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2021-04-30 01:45:57 +02:00
|
|
|
|
|
|
|
systemd.services.zigbee2mqtt.serviceConfig.DevicePolicy = lib.mkForce "auto";
|
2020-06-08 00:09:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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'\""
|
|
|
|
)
|
2021-04-30 01:45:57 +02:00
|
|
|
|
|
|
|
machine.log(machine.succeed("systemd-analyze security zigbee2mqtt.service"))
|
2020-06-08 00:09:50 +02:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|