Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d9da7f7d2d9e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ef9506d4835a
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 22, 2020

  1. nixosTests.redmine: Port to python

    Jacek Galowicz committed Apr 22, 2020
    Copy the full SHA
    0b1bef7 View commit details
  2. Merge pull request #85747 from tfc/port-redmine-test

    nixosTests.redmine: Port to python
    domenkozar authored Apr 22, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    vcunat Vladimír Čunát
    Copy the full SHA
    ef9506d View commit details
Showing with 19 additions and 51 deletions.
  1. +19 −51 nixos/tests/redmine.nix
70 changes: 19 additions & 51 deletions nixos/tests/redmine.nix
Original file line number Diff line number Diff line change
@@ -3,74 +3,42 @@
pkgs ? import ../.. { inherit system config; }
}:

with import ../lib/testing.nix { inherit system pkgs; };
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;

let
mysqlTest = package: makeTest {
machine =
{ config, pkgs, ... }:
{ services.redmine.enable = true;
services.redmine.package = package;
services.redmine.database.type = "mysql2";
services.redmine.plugins = {
redmineTest = { name, type }: makeTest {
name = "redmine-${name}";
machine = { config, pkgs, ... }: {
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";
};
};
services.redmine.themes = {
themes = {
dkuk-redmine_alex_skin = pkgs.fetchurl {
url = "https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip";
sha256 = "0hrin9lzyi50k4w2bd2b30vrf1i4fi1c0gyas5801wn8i7kpm9yl";
};
};
};
};

testScript = ''
startAll;
$machine->waitForUnit('redmine.service');
$machine->waitForOpenPort('3000');
$machine->succeed("curl --fail http://localhost:3000/");
start_all()
machine.wait_for_unit("redmine.service")
machine.wait_for_open_port(3000)
machine.succeed("curl --fail http://localhost:3000/")
'';
};

pgsqlTest = package: makeTest {
machine =
{ config, pkgs, ... }:
{ services.redmine.enable = true;
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";
};
};
};

testScript = ''
startAll;
$machine->waitForUnit('redmine.service');
$machine->waitForOpenPort('3000');
$machine->succeed("curl --fail http://localhost:3000/");
'';
};
in
{
mysql = mysqlTest pkgs.redmine // {
name = "mysql";
meta.maintainers = [ maintainers.aanderse ];
};

pgsql = pgsqlTest pkgs.redmine // {
name = "pgsql";
} // {
meta.maintainers = [ maintainers.aanderse ];
};
in {
mysql = redmineTest { name = "mysql"; type = "mysql2"; };
pgsql = redmineTest { name = "pgsql"; type = "postgresql"; };
}