about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/transfer-sh.nix
blob: f4ab7d28858e1436a1d4ae66c329460737aa311d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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/")
  '';
})