depot/third_party/nixpkgs/nixos/tests/transfer-sh.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

20 lines
450 B
Nix

import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "transfer-sh";
meta = {
maintainers = with lib.maintainers; [ ocfox ];
};
nodes.machine = { pkgs, ... }: {
services.transfer-sh = {
enable = true;
settings.LISTENER = ":1234";
};
};
testScript = ''
machine.wait_for_unit("transfer-sh.service")
machine.wait_for_open_port(1234)
machine.succeed("curl --fail http://localhost:1234/")
'';
})