Added --debug flag clan command in nix tests

This commit is contained in:
Qubasa
2024-02-05 13:37:22 +07:00
parent bc1842dd2b
commit d1a1bcf1eb
2 changed files with 4 additions and 4 deletions

View File

@@ -110,16 +110,16 @@ in
client.succeed("echo testing > /var/test-backups/somefile")
# create
client.succeed("clan --flake ${../..} backups create test_backup_client")
client.succeed("clan --debug --flake ${../..} backups create test_backup_client")
client.wait_until_succeeds("! systemctl is-active borgbackup-job-test_backup_server")
# list
backup_id = json.loads(client.succeed("borg-job-test_backup_server list --json"))["archives"][0]["archive"]
assert(backup_id in client.succeed("clan --flake ${../..} backups list test_backup_client"))
assert(backup_id in client.succeed("clan --debug --flake ${../..} backups list test_backup_client"))
# restore
client.succeed("rm -f /var/test-backups/somefile")
client.succeed(f"clan --flake ${../..} backups restore test_backup_client borgbackup {backup_id}")
client.succeed(f"clan --debug --flake ${../..} backups restore test_backup_client borgbackup {backup_id}")
assert(client.succeed("cat /var/test-backups/somefile").strip() == "testing")
'';
}

View File

@@ -107,7 +107,7 @@ in
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
client.wait_until_succeeds("ssh -o StrictHostKeyChecking=accept-new -v root@target hostname")
client.succeed("clan --flake ${../..} machines install test_install_machine root@target >&2")
client.succeed("clan --debug --flake ${../..} machines install test_install_machine root@target >&2")
try:
target.shutdown()
except BrokenPipeError: