mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
nixos/tests/gitea: make gitea package configurable
This allows the same tests to be used for forgejo, a soft-fork of gitea, which currently does not have any tests.
This commit is contained in:
parent
ac573e5046
commit
7d05a6a910
|
@ -241,7 +241,7 @@ in {
|
|||
geth = handleTest ./geth.nix {};
|
||||
ghostunnel = handleTest ./ghostunnel.nix {};
|
||||
gitdaemon = handleTest ./gitdaemon.nix {};
|
||||
gitea = handleTest ./gitea.nix {};
|
||||
gitea = handleTest ./gitea.nix { giteaPackage = pkgs.gitea; };
|
||||
gitlab = handleTest ./gitlab.nix {};
|
||||
gitolite = handleTest ./gitolite.nix {};
|
||||
gitolite-fcgiwrap = handleTest ./gitolite-fcgiwrap.nix {};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ system ? builtins.currentSystem,
|
||||
config ? {},
|
||||
giteaPackage,
|
||||
pkgs ? import ../.. { inherit system config; }
|
||||
}:
|
||||
|
||||
|
@ -9,7 +10,7 @@ with pkgs.lib;
|
|||
let
|
||||
supportedDbTypes = [ "mysql" "postgres" "sqlite3" ];
|
||||
makeGiteaTest = type: nameValuePair type (makeTest {
|
||||
name = "gitea-${type}";
|
||||
name = "${giteaPackage.pname}-${type}";
|
||||
meta.maintainers = with maintainers; [ aanderse kolaente ma27 ];
|
||||
|
||||
nodes = {
|
||||
|
@ -18,9 +19,10 @@ let
|
|||
services.gitea = {
|
||||
enable = true;
|
||||
database = { inherit type; };
|
||||
package = giteaPackage;
|
||||
settings.service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
environment.systemPackages = [ pkgs.gitea pkgs.jq ];
|
||||
environment.systemPackages = [ giteaPackage pkgs.jq ];
|
||||
services.openssh.enable = true;
|
||||
};
|
||||
client1 = { config, pkgs, ... }: {
|
||||
|
|
Loading…
Reference in a new issue