Merge pull request #217890 from IndeedNotJames/nixos-tests-gitea

nixos/tests/gitea: open up test for forgejo
This commit is contained in:
Nick Cao 2023-02-25 09:55:43 +08:00 committed by GitHub
commit eb03dde70d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View file

@ -228,6 +228,7 @@ in {
fluentd = handleTest ./fluentd.nix {};
fluidd = handleTest ./fluidd.nix {};
fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {};
forgejo = handleTest ./gitea.nix { giteaPackage = pkgs.forgejo; };
freenet = handleTest ./freenet.nix {};
freeswitch = handleTest ./freeswitch.nix {};
freshrss-sqlite = handleTest ./freshrss-sqlite.nix {};
@ -241,7 +242,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,8 +10,8 @@ with pkgs.lib;
let
supportedDbTypes = [ "mysql" "postgres" "sqlite3" ];
makeGiteaTest = type: nameValuePair type (makeTest {
name = "gitea-${type}";
meta.maintainers = with maintainers; [ aanderse kolaente ma27 ];
name = "${giteaPackage.pname}-${type}";
meta.maintainers = with maintainers; [ aanderse indeednotjames kolaente ma27 ];
nodes = {
server = { config, pkgs, ... }: {
@ -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, ... }: {

View file

@ -10,6 +10,7 @@
, lib
, makeWrapper
, nix
, nixosTests
, openssh
, pam
, pamSupport ? true
@ -65,6 +66,8 @@ buildGoModule rec {
--prefix PATH : ${lib.makeBinPath [ bash git gzip openssh ]}
'';
passthru.tests = nixosTests.forgejo;
passthru.updateScript = lib.getExe (writeShellApplication {
name = "update-forgejo";
runtimeInputs = [