mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
nixosTests.gerrit: Migrate to runTest
Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
50df425cd5
commit
9ef0e4580e
2 changed files with 47 additions and 49 deletions
|
@ -511,7 +511,7 @@ in
|
||||||
gemstash = handleTest ./gemstash.nix { };
|
gemstash = handleTest ./gemstash.nix { };
|
||||||
geoclue2 = runTest ./geoclue2.nix;
|
geoclue2 = runTest ./geoclue2.nix;
|
||||||
geoserver = runTest ./geoserver.nix;
|
geoserver = runTest ./geoserver.nix;
|
||||||
gerrit = handleTest ./gerrit.nix { };
|
gerrit = runTest ./gerrit.nix;
|
||||||
geth = handleTest ./geth.nix { };
|
geth = handleTest ./geth.nix { };
|
||||||
ghostunnel = handleTest ./ghostunnel.nix { };
|
ghostunnel = handleTest ./ghostunnel.nix { };
|
||||||
gitdaemon = handleTest ./gitdaemon.nix { };
|
gitdaemon = handleTest ./gitdaemon.nix { };
|
||||||
|
|
|
@ -1,57 +1,55 @@
|
||||||
import ./make-test-python.nix (
|
{ pkgs, ... }:
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "gerrit";
|
name = "gerrit";
|
||||||
|
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [
|
maintainers = [
|
||||||
flokli
|
flokli
|
||||||
zimbatm
|
zimbatm
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
server =
|
server =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
80
|
80
|
||||||
2222
|
2222
|
||||||
|
];
|
||||||
|
|
||||||
|
services.gerrit = {
|
||||||
|
enable = true;
|
||||||
|
serverId = "aa76c84b-50b0-4711-a0a0-1ee30e45bbd0";
|
||||||
|
listenAddress = "[::]:80";
|
||||||
|
jvmHeapLimit = "1g";
|
||||||
|
|
||||||
|
builtinPlugins = [
|
||||||
|
"hooks"
|
||||||
|
"webhooks"
|
||||||
];
|
];
|
||||||
|
settings = {
|
||||||
services.gerrit = {
|
gerrit.canonicalWebUrl = "http://server";
|
||||||
enable = true;
|
sshd.listenAddress = "[::]:2222";
|
||||||
serverId = "aa76c84b-50b0-4711-a0a0-1ee30e45bbd0";
|
sshd.advertisedAddress = "[::]:2222";
|
||||||
listenAddress = "[::]:80";
|
|
||||||
jvmHeapLimit = "1g";
|
|
||||||
|
|
||||||
builtinPlugins = [
|
|
||||||
"hooks"
|
|
||||||
"webhooks"
|
|
||||||
];
|
|
||||||
settings = {
|
|
||||||
gerrit.canonicalWebUrl = "http://server";
|
|
||||||
sshd.listenAddress = "[::]:2222";
|
|
||||||
sshd.advertisedAddress = "[::]:2222";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
client =
|
client =
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
start_all()
|
start_all()
|
||||||
server.wait_for_unit("gerrit.service")
|
server.wait_for_unit("gerrit.service")
|
||||||
server.wait_for_open_port(80)
|
server.wait_for_open_port(80)
|
||||||
client.succeed("curl http://server")
|
client.succeed("curl http://server")
|
||||||
|
|
||||||
server.wait_for_open_port(2222)
|
server.wait_for_open_port(2222)
|
||||||
client.succeed("nc -z server 2222")
|
client.succeed("nc -z server 2222")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue