diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 478501ae2e66..c71655064c11 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -511,7 +511,7 @@ in gemstash = handleTest ./gemstash.nix { }; geoclue2 = runTest ./geoclue2.nix; geoserver = runTest ./geoserver.nix; - gerrit = handleTest ./gerrit.nix { }; + gerrit = runTest ./gerrit.nix; geth = handleTest ./geth.nix { }; ghostunnel = handleTest ./ghostunnel.nix { }; gitdaemon = handleTest ./gitdaemon.nix { }; diff --git a/nixos/tests/gerrit.nix b/nixos/tests/gerrit.nix index 86e4cf90ed73..901187a6c5a5 100644 --- a/nixos/tests/gerrit.nix +++ b/nixos/tests/gerrit.nix @@ -1,57 +1,55 @@ -import ./make-test-python.nix ( - { pkgs, ... }: +{ pkgs, ... }: - { - name = "gerrit"; +{ + name = "gerrit"; - meta = with pkgs.lib.maintainers; { - maintainers = [ - flokli - zimbatm - ]; - }; + meta = with pkgs.lib.maintainers; { + maintainers = [ + flokli + zimbatm + ]; + }; - nodes = { - server = - { config, pkgs, ... }: - { - networking.firewall.allowedTCPPorts = [ - 80 - 2222 + nodes = { + server = + { config, pkgs, ... }: + { + networking.firewall.allowedTCPPorts = [ + 80 + 2222 + ]; + + services.gerrit = { + enable = true; + serverId = "aa76c84b-50b0-4711-a0a0-1ee30e45bbd0"; + listenAddress = "[::]:80"; + jvmHeapLimit = "1g"; + + builtinPlugins = [ + "hooks" + "webhooks" ]; - - services.gerrit = { - enable = true; - serverId = "aa76c84b-50b0-4711-a0a0-1ee30e45bbd0"; - listenAddress = "[::]:80"; - jvmHeapLimit = "1g"; - - builtinPlugins = [ - "hooks" - "webhooks" - ]; - settings = { - gerrit.canonicalWebUrl = "http://server"; - sshd.listenAddress = "[::]:2222"; - sshd.advertisedAddress = "[::]:2222"; - }; + settings = { + gerrit.canonicalWebUrl = "http://server"; + sshd.listenAddress = "[::]:2222"; + sshd.advertisedAddress = "[::]:2222"; }; }; + }; - client = - { ... }: - { - }; - }; + client = + { ... }: + { + }; + }; - testScript = '' - start_all() - server.wait_for_unit("gerrit.service") - server.wait_for_open_port(80) - client.succeed("curl http://server") + testScript = '' + start_all() + server.wait_for_unit("gerrit.service") + server.wait_for_open_port(80) + client.succeed("curl http://server") - server.wait_for_open_port(2222) - client.succeed("nc -z server 2222") - ''; - } -) + server.wait_for_open_port(2222) + client.succeed("nc -z server 2222") + ''; +}