nixos/borgmatic: added test

This commit is contained in:
Finn Landweber 2024-03-02 12:24:17 +01:00
parent 5adb86fdf9
commit a71502aff0
No known key found for this signature in database
2 changed files with 25 additions and 0 deletions

View File

@ -154,6 +154,7 @@ in {
bootspec = handleTestOn ["x86_64-linux"] ./bootspec.nix {};
boot-stage1 = handleTest ./boot-stage1.nix {};
borgbackup = handleTest ./borgbackup.nix {};
borgmatic = handleTest ./borgmatic.nix {};
botamusique = handleTest ./botamusique.nix {};
bpf = handleTestOn ["x86_64-linux" "aarch64-linux"] ./bpf.nix {};
bpftune = handleTest ./bpftune.nix {};

24
nixos/tests/borgmatic.nix Normal file
View File

@ -0,0 +1,24 @@
import ./make-test-python.nix ({ pkgs, ... }:
{
name = "borgmatic";
nodes.machine = { ... }: {
services.borgmatic = {
enable = true;
settings = {
source_directories = [ "/home" ];
repositories = [
{
label = "local";
path = "/var/backup";
}
];
keep_daily = 7;
};
};
};
testScript = ''
machine.succeed("borgmatic rcreate -e none")
machine.succeed("borgmatic")
'';
})