nixpkgs/nixos/tests/gerrit.nix
Felix Singer 501b85f3d5 nixos/tests/gerrit: Drop dead hook to LFS plugin
The URL scheme for downloading plugins has changed a long time ago and
the used URL is dead. Gerrit only throws an error since it can't load
the plugin but it continues to boot. However, instead of maintaining
URLs to 3rdparty plugins, which end up dead anyway, just drop it. The
test should cover Gerrit and not 3rd party plugins.

Also, while on it, drop the setting `plugins.allowRemoteAdmin = true`
since it's not needed.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2024-10-15 20:56:22 +02:00

46 lines
992 B
Nix

import ./make-test-python.nix ({ pkgs, ... }:
{
name = "gerrit";
meta = with pkgs.lib.maintainers; {
maintainers = [ flokli zimbatm ];
};
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" ];
settings = {
gerrit.canonicalWebUrl = "http://server";
sshd.listenAddress = "[::]:2222";
sshd.advertisedAddress = "[::]:2222";
};
};
};
client =
{ ... }: {
};
};
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")
'';
})