Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Sep 5, 2023
1 parent 730f7e3 commit 0720e2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------
Expand Down
9 changes: 9 additions & 0 deletions t/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0720e2e

Please sign in to comment.