nixpkgs/nixos/tests/transfer-sh.nix

26 lines
510 B
Nix
Raw Normal View History

import ./make-test-python.nix (
{ pkgs, lib, ... }:
{
name = "transfer-sh";
2024-01-25 04:23:53 +00:00
meta = {
maintainers = with lib.maintainers; [ ocfox ];
2024-01-25 04:23:53 +00:00
};
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/")
'';
}
)