1
0
Fork 1
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:
IndeedNotJames 2023-02-24 02:59:30 +01:00
parent ac573e5046
commit 7d05a6a910
No known key found for this signature in database
GPG key ID: 0AD773CE46FD0F87
2 changed files with 5 additions and 3 deletions

View file

@ -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 {};

View file

@ -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, ... }: {