diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-07-27 18:02:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 18:02:13 +0000 |
commit | c5298a170d2f40d6e0874008b00599781e6d3375 (patch) | |
tree | 4e80304d9b60fc5c6fa5fbd0a508b4fa295e8318 /nixos/tests | |
parent | 9153131664afd016e74ce1154c3535f5ca6a35d5 (diff) | |
parent | f6895f13b02c83377e26785d079d08c8e8f0205c (diff) |
Merge staging-next into staging
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/restic.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/tests/restic.nix b/nixos/tests/restic.nix index 7523d5e5ed5da..75fffe9d9a84d 100644 --- a/nixos/tests/restic.nix +++ b/nixos/tests/restic.nix @@ -63,6 +63,12 @@ import ./make-test-python.nix ( inherit repository passwordFile; pruneOpts = [ "--keep-last 1" ]; }; + custompackage = { + inherit repository passwordFile paths; + package = pkgs.writeShellScriptBin "restic" '' + echo "$@" >> /tmp/fake-restic.log; + ''; + }; }; environment.sessionVariables.RCLONE_CONFIG_LOCAL_TYPE = "local"; @@ -76,6 +82,7 @@ import ./make-test-python.nix ( "${pkgs.restic}/bin/restic -r ${repository} -p ${passwordFile} snapshots", '${pkgs.restic}/bin/restic --repository-file ${repositoryFile} -p ${passwordFile} snapshots"', "${pkgs.restic}/bin/restic -r ${rcloneRepository} -p ${passwordFile} snapshots", + "grep 'backup .* /opt' /tmp/fake-restic.log", ) server.succeed( "mkdir -p /opt", @@ -89,6 +96,8 @@ import ./make-test-python.nix ( '${pkgs.restic}/bin/restic -r ${repository} -p ${passwordFile} snapshots -c | grep -e "^1 snapshot"', '${pkgs.restic}/bin/restic --repository-file ${repositoryFile} -p ${passwordFile} snapshots -c | grep -e "^1 snapshot"', '${pkgs.restic}/bin/restic -r ${rcloneRepository} -p ${passwordFile} snapshots -c | grep -e "^1 snapshot"', + "systemctl start restic-backups-custompackage.service", + "grep 'backup .* /opt' /tmp/fake-restic.log", "timedatectl set-time '2017-12-13 13:45'", "systemctl start restic-backups-remotebackup.service", "rm /opt/backupCleanupCommand", |