diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 66a599383a95..7ef0a3a4a368 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -717,6 +717,7 @@ in homepage-dashboard = runTest ./homepage-dashboard.nix; homer = handleTest ./homer { }; honk = runTest ./honk.nix; + hoogle = runTest ./hoogle.nix; hostname = handleTest ./hostname.nix { }; hound = runTest ./hound.nix; hub = runTest ./git/hub.nix; diff --git a/nixos/tests/hoogle.nix b/nixos/tests/hoogle.nix new file mode 100644 index 000000000000..738680938e48 --- /dev/null +++ b/nixos/tests/hoogle.nix @@ -0,0 +1,31 @@ +{ lib, ... }: +{ + name = "hoogle"; + meta.maintainers = with lib.maintainers; [ h7x4 ]; + + nodes.machine = + { pkgs, ... }: + { + services.hoogle = { + enable = true; + packages = + hp: with hp; [ + arrows + lens + ]; + }; + }; + + testScript = + { nodes, ... }: + let + cfg = nodes.machine.services.hoogle; + in + '' + machine.wait_for_unit("hoogle.service") + machine.wait_for_open_port(${toString cfg.port}) + + machine.succeed("curl http://${cfg.host}:${toString cfg.port} | grep '