Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
36 lines
866 B
Nix
36 lines
866 B
Nix
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
name = "rsyncd";
|
|
meta.maintainers = with pkgs.lib.maintainers; [ ehmry ];
|
|
|
|
nodes = let
|
|
mkNode = socketActivated:
|
|
{ config, ... }: {
|
|
networking.firewall.allowedTCPPorts = [ config.services.rsyncd.port ];
|
|
services.rsyncd = {
|
|
enable = true;
|
|
inherit socketActivated;
|
|
settings = {
|
|
global = {
|
|
"reverse lookup" = false;
|
|
"forward lookup" = false;
|
|
};
|
|
tmp = {
|
|
path = "/nix/store";
|
|
comment = "test module";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
in {
|
|
a = mkNode false;
|
|
b = mkNode true;
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
a.wait_for_unit("rsync")
|
|
b.wait_for_unit("sockets.target")
|
|
b.succeed("rsync a::")
|
|
a.succeed("rsync b::")
|
|
'';
|
|
})
|