diff options
author | IndeedNotJames <git@indeednotjames.com> | 2023-02-24 02:59:30 +0100 |
---|---|---|
committer | IndeedNotJames <git@indeednotjames.com> | 2023-02-24 02:59:30 +0100 |
commit | 7d05a6a910b34c77d549889732840499d987d5f9 (patch) | |
tree | eaef64b99923bfb1670a97a3e08e15ea0ed5c8aa /nixos/tests | |
parent | ac573e5046f1e2ff60e4260771a88b9862fa7148 (diff) |
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.
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 2 | ||||
-rw-r--r-- | nixos/tests/gitea.nix | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index ecf95c2cba0a4..ea773a2db2276 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/gitea.nix b/nixos/tests/gitea.nix index 68a2566c11911..24c84e54fc1db 100644 --- a/nixos/tests/gitea.nix +++ b/nixos/tests/gitea.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, ... }: { |