diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index f233dfbf065d..6c087d6cdcdc 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -802,7 +802,7 @@ in systemdStage1 = true; }; hister = runTest ./hister.nix; - hitch = handleTest ./hitch { }; + hitch = runTest ./hitch; hledger-web = runTest ./hledger-web.nix; hockeypuck = runTest ./hockeypuck.nix; holo-daemon-modular-service = runTest ./holo-daemon-modular.nix; diff --git a/nixos/tests/hitch/default.nix b/nixos/tests/hitch/default.nix index 9d0386dac3d5..36d8d519584c 100644 --- a/nixos/tests/hitch/default.nix +++ b/nixos/tests/hitch/default.nix @@ -1,36 +1,34 @@ -import ../make-test-python.nix ( - { pkgs, ... }: - { - name = "hitch"; - meta = with pkgs.lib.maintainers; { - maintainers = [ jflanglois ]; - }; - 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"; - }; +{ pkgs, ... }: +{ + name = "hitch"; + meta = with pkgs.lib.maintainers; { + maintainers = [ jflanglois ]; + }; + nodes.machine = + { pkgs, ... }: + { + environment.systemPackages = [ pkgs.curl ]; + services.hitch = { + enable = true; + backend = "[127.0.0.1]:80"; + pem-files = [ + ./example.pem + ]; }; - testScript = '' - start_all() + services.httpd = { + enable = true; + virtualHosts.localhost.documentRoot = ./example; + adminAddr = "noone@testing.nowhere"; + }; + }; - 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") - ''; - } -) + 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") + ''; +}