summaryrefslogtreecommitdiffstats
path: root/nixos/tests/transfer-sh.nix
blob: dc628db33f1e7c3151a0cba8287925f9fad8c7fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ 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/")
  '';
}