1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00
nixpkgs/nixos/tests/hitch/default.nix
Julien Langlois 519b64592d hitch: init at 1.4.8 + service + test (#39358)
Add the Hitch TLS reverse proxy as an option for TLS termination.
2018-05-01 10:36:36 +01:00

34 lines
776 B
Nix

import ../make-test.nix ({ pkgs, ... }:
{
name = "hitch";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ jflanglois ];
};
machine = { config, pkgs, ... }: {
environment.systemPackages = [ pkgs.curl ];
services.hitch = {
enable = true;
backend = "[127.0.0.1]:80";
pem-files = [
./example.pem
];
};
services.httpd = {
enable = true;
documentRoot = ./example;
adminAddr = "noone@testing.nowhere";
};
};
testScript =
''
startAll;
$machine->waitForUnit('multi-user.target');
$machine->waitForUnit('hitch.service');
$machine->waitForOpenPort(443);
$machine->succeed('curl -k https://localhost:443/index.txt | grep "We are all good!"');
'';
})