at master 882 B view raw
1import ../make-test-python.nix ( 2 { pkgs, ... }: 3 { 4 name = "hitch"; 5 meta = with pkgs.lib.maintainers; { 6 maintainers = [ jflanglois ]; 7 }; 8 nodes.machine = 9 { pkgs, ... }: 10 { 11 environment.systemPackages = [ pkgs.curl ]; 12 services.hitch = { 13 enable = true; 14 backend = "[127.0.0.1]:80"; 15 pem-files = [ 16 ./example.pem 17 ]; 18 }; 19 20 services.httpd = { 21 enable = true; 22 virtualHosts.localhost.documentRoot = ./example; 23 adminAddr = "noone@testing.nowhere"; 24 }; 25 }; 26 27 testScript = '' 28 start_all() 29 30 machine.wait_for_unit("multi-user.target") 31 machine.wait_for_unit("hitch.service") 32 machine.wait_for_open_port(443) 33 assert "We are all good!" in machine.succeed("curl -fk https://localhost:443/index.txt") 34 ''; 35 } 36)