vuls: init at 0.27.0
[NixPkgs.git] / nixos / tests / redmine.nix
blob16fb2e2c64a61062b9677a2c13ac0809303bd82f
1 { system ? builtins.currentSystem,
2   config ? {},
3   pkgs ? import ../.. { inherit system config; }
4 }:
6 with import ../lib/testing-python.nix { inherit system pkgs; };
7 with pkgs.lib;
9 let
10   redmineTest = { name, type }: makeTest {
11     name = "redmine-${name}";
12     nodes.machine = { config, pkgs, ... }: {
13       services.redmine = {
14         enable = true;
15         package = pkgs.redmine;
16         database.type = type;
17         plugins = {
18           redmine_env_auth = pkgs.fetchurl {
19             url = "https://github.com/Intera/redmine_env_auth/archive/0.7.zip";
20             sha256 = "1xb8lyarc7mpi86yflnlgyllh9hfwb9z304f19dx409gqpia99sc";
21           };
22         };
23         themes = {
24           dkuk-redmine_alex_skin = pkgs.fetchurl {
25             url = "https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip";
26             sha256 = "0hrin9lzyi50k4w2bd2b30vrf1i4fi1c0gyas5801wn8i7kpm9yl";
27           };
28         };
29       };
30     };
32     testScript = ''
33       start_all()
34       machine.wait_for_unit("redmine.service")
35       machine.wait_for_open_port(3000)
36       machine.succeed("curl --fail http://localhost:3000/")
37     '';
38   } // {
39     meta.maintainers = [ maintainers.aanderse ];
40   };
41 in {
42   sqlite3 = redmineTest { name = "sqlite3"; type = "sqlite3"; };
43   mysql = redmineTest { name = "mysql"; type = "mysql2"; };
44   pgsql = redmineTest { name = "pgsql"; type = "postgresql"; };