add backup test for deluge

This commit is contained in:
ibizaman 2024-11-30 01:51:11 +01:00
parent b171cf8aba
commit 65d911d76c
2 changed files with 22 additions and 5 deletions

View file

@ -247,6 +247,7 @@ in
description = '' description = ''
Backup configuration. Backup configuration.
''; '';
default = {};
type = lib.types.submodule { type = lib.types.submodule {
options = contracts.backup.mkRequester { options = contracts.backup.mkRequester {
user = "deluge"; user = "deluge";

View file

@ -7,7 +7,7 @@ let
testLib = pkgs.callPackage ../common.nix {}; testLib = pkgs.callPackage ../common.nix {};
commonTestScript = lib.makeOverridable testLib.accessScript { commonTestScript = testLib.mkScripts {
inherit subdomain domain; inherit subdomain domain;
hasSSL = { node, ... }: !(isNull node.config.shb.deluge.ssl); hasSSL = { node, ... }: !(isNull node.config.shb.deluge.ssl);
waitForServices = { ... }: [ waitForServices = { ... }: [
@ -134,7 +134,23 @@ in
nodes.client = {}; nodes.client = {};
testScript = commonTestScript; testScript = commonTestScript.access;
};
backup = pkgs.testers.runNixOSTest {
name = "deluge_backup";
nodes.server = { config, ... }: {
imports = [
base
basic
(testLib.backup config.shb.deluge.backup)
];
};
nodes.client = {};
testScript = commonTestScript.backup;
}; };
https = pkgs.testers.runNixOSTest { https = pkgs.testers.runNixOSTest {
@ -151,7 +167,7 @@ in
nodes.client = {}; nodes.client = {};
testScript = commonTestScript; testScript = commonTestScript.access;
}; };
sso = pkgs.testers.runNixOSTest { sso = pkgs.testers.runNixOSTest {
@ -171,7 +187,7 @@ in
nodes.client = {}; nodes.client = {};
testScript = commonTestScript.override { testScript = commonTestScript.access.override {
redirectSSO = true; redirectSSO = true;
}; };
}; };
@ -192,7 +208,7 @@ in
nodes.client = {}; nodes.client = {};
testScript = inputs: testScript = inputs:
(commonTestScript inputs) (commonTestScript.access inputs)
+ (prometheusTestScript inputs); + (prometheusTestScript inputs);
}; };
} }