2020-03-05 21:11:28 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }:
|
|
|
|
|
2024-10-10 04:44:59 +00:00
|
|
|
{
|
2020-03-05 21:11:28 +00:00
|
|
|
name = "gerrit";
|
|
|
|
|
2021-01-10 19:08:30 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-03-05 21:11:28 +00:00
|
|
|
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")
|
|
|
|
'';
|
|
|
|
})
|