nixpkgs-suyu/nixos/tests/hitch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
798 B
Nix
Raw Normal View History

2019-12-16 22:02:36 +01:00
import ../make-test-python.nix ({ pkgs, ... }:
{
name = "hitch";
meta = with pkgs.lib.maintainers; {
maintainers = [ jflanglois ];
};
2022-03-21 00:15:30 +01:00
nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.curl ];
services.hitch = {
enable = true;
backend = "[127.0.0.1]:80";
pem-files = [
./example.pem
];
};
services.httpd = {
enable = true;
virtualHosts.localhost.documentRoot = ./example;
adminAddr = "noone@testing.nowhere";
};
};
testScript =
''
2019-12-16 22:02:36 +01:00
start_all()
2019-12-16 22:02:36 +01:00
machine.wait_for_unit("multi-user.target")
machine.wait_for_unit("hitch.service")
machine.wait_for_open_port(443)
2020-09-16 17:55:42 +02:00
assert "We are all good!" in machine.succeed("curl -fk https://localhost:443/index.txt")
'';
})