refactor pkgs in tests

This commit is contained in:
ibizaman 2025-01-23 20:35:44 +01:00 committed by Pierre Penninckx
parent 072979fce2
commit b776bd07bc
11 changed files with 22 additions and 41 deletions

View file

@ -191,7 +191,7 @@ in
systemd.services.nginx.requires = [ config.shb.certs.certs.selfsigned.n.systemdService ];
};
ldap = pkgs: { config, ... }: {
ldap = { config, pkgs, ... }: {
imports = [
../modules/blocks/ldap.nix
];
@ -221,7 +221,7 @@ in
};
};
sso = pkgs: ssl: { config, ... }: {
sso = ssl: { config, pkgs, ... }: {
imports = [
../modules/blocks/authelia.nix
];

View file

@ -1,7 +1,5 @@
{ pkgs, lib, ... }:
let
pkgs' = pkgs;
healthUrl = "/health";
loginUrl = "/UI/Login";
@ -130,8 +128,8 @@ let
testLib.certs
(basic appname)
(https appname)
(testLib.ldap pkgs')
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
testLib.ldap
(testLib.sso config.shb.certs.certs.selfsigned.n)
(sso appname)
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
commonTestScript = testLib.accessScript {
@ -91,8 +89,8 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
testLib.ldap
(testLib.sso config.shb.certs.certs.selfsigned.n)
sso
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
commonTestScript = testLib.mkScripts {
@ -182,8 +180,8 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
testLib.ldap
(testLib.sso config.shb.certs.certs.selfsigned.n)
sso
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
adminPassword = "AdminPassword";
@ -154,7 +152,7 @@ in
testLib.baseModule
../../modules/services/forgejo.nix
basic
(testLib.ldap pkgs')
testLib.ldap
ldap
];
};
@ -174,8 +172,8 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
testLib.ldap
(testLib.sso config.shb.certs.certs.selfsigned.n)
sso
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
adminPassword = "AdminPassword";
@ -99,8 +97,8 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
testLib.ldap
(testLib.sso config.shb.certs.certs.selfsigned.n)
sso
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
commonTestScript = testLib.mkScripts {
@ -165,7 +163,7 @@ in
testLib.baseModule
../../modules/services/home-assistant.nix
basic
(testLib.ldap pkgs')
testLib.ldap
ldap
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
commonTestScript = testLib.mkScripts {
@ -130,7 +128,7 @@ in
testLib.baseModule
../../modules/services/jellyfin.nix
basic
(testLib.ldap pkgs')
testLib.ldap
ldap
];
};
@ -150,8 +148,8 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
testLib.ldap
(testLib.sso config.shb.certs.certs.selfsigned.n)
sso
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
password = "securepw";

View file

@ -1,6 +1,5 @@
{ pkgs, lib, ... }:
let
pkgs' = pkgs;
adminUser = "root";
adminPass = "rootpw";
oidcSecret = "oidcSecret";
@ -332,7 +331,7 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
testLib.ldap
ldap
];
};
@ -352,9 +351,9 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
testLib.ldap
ldap
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
(testLib.sso config.shb.certs.certs.selfsigned.n)
sso
];
};

View file

@ -1,7 +1,5 @@
{ pkgs, lib, ... }:
let
pkgs' = pkgs;
testLib = pkgs.callPackage ../common.nix {};
commonTestScript = testLib.mkScripts {
@ -155,8 +153,8 @@ in
testLib.certs
basic
https
(testLib.ldap pkgs')
(testLib.sso pkgs' config.shb.certs.certs.selfsigned.n)
testLib.ldap
(testLib.sso config.shb.certs.certs.selfsigned.n)
sso
];
};