nixos/locate: Add a test
This commit is contained in:
parent
e0d27cfb31
commit
e0e08a186d
2 changed files with 22 additions and 0 deletions
|
@ -190,6 +190,7 @@ in
|
|||
lidarr = handleTest ./lidarr.nix {};
|
||||
lightdm = handleTest ./lightdm.nix {};
|
||||
limesurvey = handleTest ./limesurvey.nix {};
|
||||
locate = handleTest ./locate.nix {};
|
||||
login = handleTest ./login.nix {};
|
||||
loki = handleTest ./loki.nix {};
|
||||
lxd = handleTest ./lxd.nix {};
|
||||
|
|
21
nixos/tests/locate.nix
Normal file
21
nixos/tests/locate.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
import ./make-test-python.nix ({ lib, pkgs, ... }:
|
||||
let inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey;
|
||||
in {
|
||||
name = "locate";
|
||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ chkno ];
|
||||
|
||||
nodes = rec {
|
||||
a = {
|
||||
services.locate = {
|
||||
enable = true;
|
||||
interval = "*:*:0/5";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
a.succeed("touch /file-on-a-machine-1")
|
||||
a.wait_for_file("/var/cache/locatedb")
|
||||
a.wait_until_succeeds("locate file-on-a-machine-1")
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue