tests: use shb.lib everywhere
This commit is contained in:
parent
5cb60a9c6c
commit
8d6f38a6c7
4 changed files with 19 additions and 25 deletions
|
|
@ -455,7 +455,7 @@ in
|
|||
modules ? [],
|
||||
owner ? "root",
|
||||
content ? "secretPasswordA",
|
||||
}: pkgs.testers.runNixOSTest {
|
||||
}: lib.shb.runNixOSTest {
|
||||
inherit name;
|
||||
|
||||
nodes.machine = { config, ... }: {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
testLib = pkgs.callPackage ../common.nix { };
|
||||
|
||||
commonTest =
|
||||
user:
|
||||
lib.shb.runNixOSTest {
|
||||
|
|
@ -11,7 +9,7 @@ let
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
testLib.baseImports
|
||||
lib.shb.baseImports
|
||||
|
||||
../../modules/blocks/hardcodedsecret.nix
|
||||
../../modules/blocks/borgbackup.nix
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
testLib = pkgs.callPackage ../common.nix { };
|
||||
|
||||
commonTest =
|
||||
user:
|
||||
lib.shb.runNixOSTest {
|
||||
|
|
@ -11,7 +9,7 @@ let
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
testLib.baseImports
|
||||
lib.shb.baseImports
|
||||
|
||||
../../modules/blocks/hardcodedsecret.nix
|
||||
../../modules/blocks/restic.nix
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
nextauthSecret = "nextauthSecret";
|
||||
oidcSecret = "oidcSecret";
|
||||
|
||||
testLib = pkgs.callPackage ../common.nix { };
|
||||
|
||||
commonTestScript = testLib.mkScripts {
|
||||
commonTestScript = lib.shb.mkScripts {
|
||||
hasSSL = { node, ... }: !(isNull node.config.shb.karakeep.ssl);
|
||||
waitForServices =
|
||||
{ ... }:
|
||||
|
|
@ -27,7 +25,7 @@ let
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
testLib.baseModule
|
||||
lib.shb.baseModule
|
||||
../../modules/services/karakeep.nix
|
||||
];
|
||||
|
||||
|
|
@ -79,8 +77,8 @@ let
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
testLib.baseModule
|
||||
testLib.clientLoginModule
|
||||
lib.shb.baseModule
|
||||
lib.shb.clientLoginModule
|
||||
];
|
||||
test = {
|
||||
subdomain = "k";
|
||||
|
|
@ -173,7 +171,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
basic = pkgs.testers.runNixOSTest {
|
||||
basic = lib.shb.runNixOSTest {
|
||||
name = "karakeep_basic";
|
||||
|
||||
nodes.client = { };
|
||||
|
|
@ -186,7 +184,7 @@ in
|
|||
testScript = commonTestScript.access;
|
||||
};
|
||||
|
||||
backup = pkgs.testers.runNixOSTest {
|
||||
backup = lib.shb.runNixOSTest {
|
||||
name = "karakeep_backup";
|
||||
|
||||
nodes.server =
|
||||
|
|
@ -194,7 +192,7 @@ in
|
|||
{
|
||||
imports = [
|
||||
basic
|
||||
(testLib.backup config.shb.karakeep.backup)
|
||||
(lib.shb.backup config.shb.karakeep.backup)
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -203,14 +201,14 @@ in
|
|||
testScript = commonTestScript.backup;
|
||||
};
|
||||
|
||||
https = pkgs.testers.runNixOSTest {
|
||||
https = lib.shb.runNixOSTest {
|
||||
name = "karakeep_https";
|
||||
|
||||
nodes.client = { };
|
||||
nodes.server = {
|
||||
imports = [
|
||||
basic
|
||||
testLib.certs
|
||||
lib.shb.certs
|
||||
https
|
||||
];
|
||||
};
|
||||
|
|
@ -218,7 +216,7 @@ in
|
|||
testScript = commonTestScript.access;
|
||||
};
|
||||
|
||||
sso = pkgs.testers.runNixOSTest {
|
||||
sso = lib.shb.runNixOSTest {
|
||||
name = "karakeep_sso";
|
||||
interactive.sshBackdoor.enable = true;
|
||||
|
||||
|
|
@ -234,11 +232,11 @@ in
|
|||
{
|
||||
imports = [
|
||||
basic
|
||||
testLib.certs
|
||||
lib.shb.certs
|
||||
https
|
||||
testLib.ldap
|
||||
lib.shb.ldap
|
||||
ldap
|
||||
(testLib.sso config.shb.certs.certs.selfsigned.n)
|
||||
(lib.shb.sso config.shb.certs.certs.selfsigned.n)
|
||||
sso
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue