1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00
nixpkgs/nixos/tests/watchdogd.nix
2024-01-20 00:15:35 +01:00

23 lines
592 B
Nix

import ./make-test-python.nix ({ lib, ... }: {
name = "watchdogd";
meta.maintainers = with lib.maintainers; [ vifino ];
nodes.machine = { pkgs, ... }: {
virtualisation.qemu.options = [
"-device i6300esb" # virtual watchdog timer
];
boot.kernelModules = [ "i6300esb" ];
services.watchdogd.enable = true;
services.watchdogd.settings = {
supervisor.enabled = true;
};
};
testScript = ''
machine.wait_for_unit("watchdogd.service")
assert "i6300ESB" in machine.succeed("watchdogctl status")
machine.succeed("watchdogctl test")
'';
})