diff options
Diffstat (limited to 'nixos/tests/hitch/default.nix')
-rw-r--r-- | nixos/tests/hitch/default.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixos/tests/hitch/default.nix b/nixos/tests/hitch/default.nix new file mode 100644 index 00000000000..a1d8e616260 --- /dev/null +++ b/nixos/tests/hitch/default.nix @@ -0,0 +1,33 @@ +import ../make-test-python.nix ({ pkgs, ... }: +{ + name = "hitch"; + meta = with pkgs.lib.maintainers; { + maintainers = [ jflanglois ]; + }; + 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 = + '' + start_all() + + machine.wait_for_unit("multi-user.target") + machine.wait_for_unit("hitch.service") + machine.wait_for_open_port(443) + assert "We are all good!" in machine.succeed("curl -fk https://localhost:443/index.txt") + ''; +}) |