nixpkgs/nixos/tests/zigbee2mqtt.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
717 B
Nix
Raw Normal View History

import ./make-test-python.nix ({ pkgs, lib, ... }:
2020-06-07 23:09:50 +01:00
{
2022-09-01 12:32:47 +01:00
name = "zigbee2mqtt";
2022-03-20 23:15:30 +00:00
nodes.machine = { pkgs, ... }:
2020-06-07 23:09:50 +01:00
{
services.zigbee2mqtt = {
enable = true;
};
systemd.services.zigbee2mqtt.serviceConfig.DevicePolicy = lib.mkForce "auto";
2020-06-07 23:09:50 +01: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'\""
)
machine.log(machine.succeed("systemd-analyze security zigbee2mqtt.service"))
2020-06-07 23:09:50 +01:00
'';
}
)