From 0720e2e07ba3bd08466262017277e5ed2b49f140 Mon Sep 17 00:00:00 2001 From: ma Date: Tue, 5 Sep 2023 11:47:26 +0200 Subject: [PATCH] add test --- Changelog | 2 ++ t/tests.bats | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/Changelog b/Changelog index c9964192..97ad9210 100644 --- a/Changelog +++ b/Changelog @@ -4,6 +4,8 @@ Version 1.9.39 * New feature: compute adler32 checksum for written data and add verify option to virtnbdrestore, so its possible to check for altered backup file contents. + * TODO: store checksum in file and compare against calculated value + during verify, fail if checksum doesnt match. Version 1.9.38 --------- diff --git a/t/tests.bats b/t/tests.bats index 818a4f9c..9a857673 100644 --- a/t/tests.bats +++ b/t/tests.bats @@ -162,6 +162,15 @@ setup() { echo "output = ${output}" [ "$status" -eq 0 ] } +@test "Compute checksums using virtnbdrestore verify" { + rm -rf $BACKUPSET + run ../virtnbdbackup -l copy -d $VM -o $BACKUPSET + echo "output = ${output}" + [ "$status" -eq 0 ] + run ../virtnbdrestore -i $BACKUPSET -o verify + echo "output = ${output}" + [ "$status" -eq 0 ] +} @test "Backup in stream format, check if multiple writers are used" { [ $DISK_COUNT -lt 2 ] && skip "vm has only one disk" rm -rf $BACKUPSET