nixpkgs/nixos/tests/redmine.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.4 KiB
Nix
Raw Normal View History

{ system ? builtins.currentSystem,
config ? {},
pkgs ? import ../.. { inherit system config; }
}:
2020-04-22 06:36:27 +00:00
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;
let
2020-04-22 06:36:27 +00:00
redmineTest = { name, type }: makeTest {
name = "redmine-${name}";
2022-03-20 23:15:30 +00:00
nodes.machine = { config, pkgs, ... }: {
2020-04-22 06:36:27 +00:00
services.redmine = {
enable = true;
package = pkgs.redmine;
database.type = type;
plugins = {
redmine_env_auth = pkgs.fetchurl {
url = "https://github.com/Intera/redmine_env_auth/archive/0.7.zip";
sha256 = "1xb8lyarc7mpi86yflnlgyllh9hfwb9z304f19dx409gqpia99sc";
};
};
2020-04-22 06:36:27 +00:00
themes = {
dkuk-redmine_alex_skin = pkgs.fetchurl {
url = "https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip";
sha256 = "0hrin9lzyi50k4w2bd2b30vrf1i4fi1c0gyas5801wn8i7kpm9yl";
};
};
};
2020-04-22 06:36:27 +00:00
};
testScript = ''
2020-04-22 06:36:27 +00:00
start_all()
machine.wait_for_unit("redmine.service")
machine.wait_for_open_port(3000)
machine.succeed("curl --fail http://localhost:3000/")
'';
2020-04-22 06:36:27 +00:00
} // {
meta.maintainers = [ maintainers.aanderse ];
};
2020-04-22 06:36:27 +00:00
in {
sqlite3 = redmineTest { name = "sqlite3"; type = "sqlite3"; };
2020-04-22 06:36:27 +00:00
mysql = redmineTest { name = "mysql"; type = "mysql2"; };
pgsql = redmineTest { name = "pgsql"; type = "postgresql"; };
}