Skip to content

Commit

Permalink
systemtests: extend fileset-multiple-blocks
Browse files Browse the repository at this point in the history
- test all signature options MD5,SHA1,SHA256,SHA512,XXH128
- test all compression options GZIP,GZIP(LEVEL),LZO,LZ4,LZ4HC

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
  • Loading branch information
bruno-at-bareos committed Aug 7, 2023
1 parent 3da4cc5 commit 0852739
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
Expand Up @@ -20,11 +20,29 @@ FileSet {
wild = @tmpdir@/data-multi-options/*3/*
}
Options {
signature = MD5
compression = LZ4
signature = SHA1
compression = LZO
wilddir = @tmpdir@/data-multi-options/*4
wild = @tmpdir@/data-multi-options/*4/*
}
Options {
signature = SHA256
compression = LZ4
wilddir = @tmpdir@/data-multi-options/*5
wild = @tmpdir@/data-multi-options/*5/*
}
Options {
signature = SHA512
compression = LZ4HC
wilddir = @tmpdir@/data-multi-options/*6
wild = @tmpdir@/data-multi-options/*6/*
}
Options {
signature = XXH128
compression = LZ4
wilddir = @tmpdir@/data-multi-options/*7
wild = @tmpdir@/data-multi-options/*7/*
}
Options {
exclude = yes
wilddir = @tmpdir@/data-multi-options/*
Expand Down
Expand Up @@ -28,7 +28,7 @@ BackupFileExtra=${BackupDirectory}/extrafile.txt

start_test

for i in 1 2 3 4 5 6; do
for i in 1 2 3 4 5 6 7 8 9; do
mkdir -p ${BackupDirectory}/data$i
echo "test" > ${BackupDirectory}/data${i}/test.dat
done
Expand Down Expand Up @@ -73,13 +73,15 @@ check_restore_diff ${BackupDirectory}/data1
check_restore_diff ${BackupDirectory}/data2
check_restore_diff ${BackupDirectory}/data3
check_restore_diff ${BackupDirectory}/data4
#check_restore_diff ${BackupDirectory}/data5
if [ -e ${tmp}/bareos-restores/${BackupDirectory}/data5 ]; then
set_error "Directory data5 has been restored, however it should be excluded from the backup."
check_restore_diff ${BackupDirectory}/data5
check_restore_diff ${BackupDirectory}/data6
check_restore_diff ${BackupDirectory}/data7
if [ -e ${tmp}/bareos-restores/${BackupDirectory}/data8 ]; then
set_error "Directory data8 has been restored, however it should be excluded from the backup."
fi
#check_restore_diff ${BackupDirectory}/data6
if [ -e ${tmp}/bareos-restores/${BackupDirectory}/data6 ]; then
set_error "Directory data6 has been restored, however it should be excluded from the backup."
#check_restore_diff ${BackupDirectory}/data9
if [ -e ${tmp}/bareos-restores/${BackupDirectory}/data9 ]; then
set_error "Directory data9 has been restored, however it should be excluded from the backup."
fi

# do some manual testing
Expand All @@ -90,6 +92,12 @@ fi

check_compression "${Storage}" "${VolumeName}" "1" "${BackupDirectory}/data2/test.dat" "gzip"
check_compression "${Storage}" "${VolumeName}" "1" "${BackupDirectory}/data3/test.dat" "gzip" "9"
#lzo
check_compression "${Storage}" "${VolumeName}" "1" "${BackupDirectory}/data4/test.dat" "lzo1x"
#lz4
check_compression "${Storage}" "${VolumeName}" "1" "${BackupDirectory}/data5/test.dat" "fz4l"
#lz4hc
check_compression "${Storage}" "${VolumeName}" "1" "${BackupDirectory}/data6/test.dat" "fz4h"
# Warning: LZ4 compression support requested in fileset but not available on this platform. Disabling ...
#check_compression "${Storage}" "${VolumeName}" "1" "${tmp}/data/data3/test.dat" "LZ4"

Expand Down

0 comments on commit 0852739

Please sign in to comment.