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