aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/tests/hitch/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/hitch/default.nix')
-rw-r--r--nixpkgs/nixos/tests/hitch/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/hitch/default.nix b/nixpkgs/nixos/tests/hitch/default.nix
new file mode 100644
index 00000000000..cb24c4dcffc
--- /dev/null
+++ b/nixpkgs/nixos/tests/hitch/default.nix
@@ -0,0 +1,33 @@
+import ../make-test.nix ({ pkgs, ... }:
+{
+ name = "hitch";
+ meta = with pkgs.stdenv.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;
+ 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!"');
+ '';
+})