2019-02-05 12:51:33 +01:00
|
|
|
{ system ? builtins.currentSystem,
|
|
|
|
config ? {},
|
|
|
|
pkgs ? import ../.. { inherit system config; }
|
|
|
|
}:
|
|
|
|
|
|
|
|
with import ../lib/testing.nix { inherit system pkgs; };
|
|
|
|
with pkgs.lib;
|
2018-10-11 03:04:08 +02:00
|
|
|
|
2019-02-05 12:51:33 +01:00
|
|
|
let
|
2019-02-26 03:17:50 +01:00
|
|
|
mysqlTest = package: makeTest {
|
2019-02-05 12:51:33 +01:00
|
|
|
machine =
|
|
|
|
{ config, pkgs, ... }:
|
2019-06-22 22:03:42 +02:00
|
|
|
{ services.redmine.enable = true;
|
2019-02-05 12:51:33 +01:00
|
|
|
services.redmine.package = package;
|
2019-02-26 03:17:50 +01:00
|
|
|
services.redmine.database.type = "mysql2";
|
2019-02-05 12:51:33 +01:00
|
|
|
services.redmine.plugins = {
|
|
|
|
redmine_env_auth = pkgs.fetchurl {
|
|
|
|
url = https://github.com/Intera/redmine_env_auth/archive/0.7.zip;
|
|
|
|
sha256 = "1xb8lyarc7mpi86yflnlgyllh9hfwb9z304f19dx409gqpia99sc";
|
|
|
|
};
|
2018-10-11 03:04:08 +02:00
|
|
|
};
|
2019-02-05 12:51:33 +01:00
|
|
|
services.redmine.themes = {
|
|
|
|
dkuk-redmine_alex_skin = pkgs.fetchurl {
|
|
|
|
url = https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip;
|
|
|
|
sha256 = "0hrin9lzyi50k4w2bd2b30vrf1i4fi1c0gyas5801wn8i7kpm9yl";
|
|
|
|
};
|
2018-10-11 03:04:08 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-02-05 12:51:33 +01:00
|
|
|
testScript = ''
|
|
|
|
startAll;
|
2019-02-26 03:17:50 +01:00
|
|
|
$machine->waitForUnit('redmine.service');
|
|
|
|
$machine->waitForOpenPort('3000');
|
|
|
|
$machine->succeed("curl --fail http://localhost:3000/");
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
pgsqlTest = package: makeTest {
|
|
|
|
machine =
|
|
|
|
{ config, pkgs, ... }:
|
2019-06-22 22:03:42 +02:00
|
|
|
{ services.redmine.enable = true;
|
2019-02-26 03:17:50 +01:00
|
|
|
services.redmine.package = package;
|
|
|
|
services.redmine.database.type = "postgresql";
|
|
|
|
services.redmine.plugins = {
|
|
|
|
redmine_env_auth = pkgs.fetchurl {
|
|
|
|
url = https://github.com/Intera/redmine_env_auth/archive/0.7.zip;
|
|
|
|
sha256 = "1xb8lyarc7mpi86yflnlgyllh9hfwb9z304f19dx409gqpia99sc";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.redmine.themes = {
|
|
|
|
dkuk-redmine_alex_skin = pkgs.fetchurl {
|
|
|
|
url = https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip;
|
|
|
|
sha256 = "0hrin9lzyi50k4w2bd2b30vrf1i4fi1c0gyas5801wn8i7kpm9yl";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2019-02-05 12:51:33 +01:00
|
|
|
|
2019-02-26 03:17:50 +01:00
|
|
|
testScript = ''
|
|
|
|
startAll;
|
2019-02-05 12:51:33 +01:00
|
|
|
$machine->waitForUnit('redmine.service');
|
|
|
|
$machine->waitForOpenPort('3000');
|
|
|
|
$machine->succeed("curl --fail http://localhost:3000/");
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2019-10-22 03:09:56 +02:00
|
|
|
mysql = mysqlTest pkgs.redmine // {
|
|
|
|
name = "mysql";
|
2019-02-26 03:17:50 +01:00
|
|
|
meta.maintainers = [ maintainers.aanderse ];
|
|
|
|
};
|
|
|
|
|
2019-10-22 03:09:56 +02:00
|
|
|
pgsql = pgsqlTest pkgs.redmine // {
|
|
|
|
name = "pgsql";
|
2019-02-05 12:51:33 +01:00
|
|
|
meta.maintainers = [ maintainers.aanderse ];
|
|
|
|
};
|
|
|
|
}
|