nixosTests.watchdogd: init
This commit is contained in:
parent
58cbe00eb6
commit
07d610c8ab
2 changed files with 23 additions and 0 deletions
|
@ -944,6 +944,7 @@ in {
|
|||
vsftpd = handleTest ./vsftpd.nix {};
|
||||
warzone2100 = handleTest ./warzone2100.nix {};
|
||||
wasabibackend = handleTest ./wasabibackend.nix {};
|
||||
watchdogd = handleTest ./watchdogd.nix {};
|
||||
webhook = runTest ./webhook.nix;
|
||||
wiki-js = handleTest ./wiki-js.nix {};
|
||||
wine = handleTest ./wine.nix {};
|
||||
|
|
22
nixos/tests/watchdogd.nix
Normal file
22
nixos/tests/watchdogd.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
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")
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue