test vaultwarden backup
This commit is contained in:
parent
2a6bbd0f53
commit
356a558404
1 changed files with 40 additions and 0 deletions
|
|
@ -87,6 +87,25 @@ let
|
||||||
authEndpoint = "https://${config.shb.authelia.subdomain}.${config.shb.authelia.domain}";
|
authEndpoint = "https://${config.shb.authelia.subdomain}.${config.shb.authelia.domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
backup = { config, ... }: {
|
||||||
|
imports = [
|
||||||
|
../../modules/blocks/restic.nix
|
||||||
|
];
|
||||||
|
shb.restic.instances."testinstance" = config.shb.vaultwarden.backup // {
|
||||||
|
enable = true;
|
||||||
|
passphraseFile = pkgs.writeText "passphrase" "PassPhrase";
|
||||||
|
repositories = [
|
||||||
|
{
|
||||||
|
path = "/opt/repos/A";
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "00:00:00";
|
||||||
|
RandomizedDelaySec = "5h";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
basic = pkgs.testers.runNixOSTest {
|
basic = pkgs.testers.runNixOSTest {
|
||||||
|
|
@ -168,4 +187,25 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
backup = pkgs.testers.runNixOSTest {
|
||||||
|
name = "vaultwarden_backup";
|
||||||
|
|
||||||
|
nodes.server = { config, ... }: {
|
||||||
|
imports = [
|
||||||
|
base
|
||||||
|
basic
|
||||||
|
backup
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes.client = {};
|
||||||
|
|
||||||
|
testScript = commonTestScript.override {
|
||||||
|
extraScript = { proto_fqdn, ... }: ''
|
||||||
|
with subtest("backup"):
|
||||||
|
server.succeed("systemctl start restic-backups-testinstance_opt_repos_A")
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue