Skip to content

Commit

Permalink
systemtests: introduce testrunner-bcopy-autoxflate
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and arogge committed Feb 2, 2023
1 parent 463bc4b commit 057ccf1
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
1 change: 0 additions & 1 deletion systemtests/scripts/cleanup
@@ -1,6 +1,5 @@
#!/bin/bash
set -u

#shellcheck source=../environment.in
. ./environment

Expand Down
5 changes: 5 additions & 0 deletions systemtests/tests/bareos-basic/CMakeLists.txt
Expand Up @@ -45,3 +45,8 @@ set_tests_properties(
PROPERTIES FIXTURES_REQUIRED
"system:bareos:backup-job-fixture;system:bareos-fixture"
)
set_tests_properties(
system:bareos:bcopy-autoxflate
PROPERTIES FIXTURES_REQUIRED
"system:bareos:backup-job-fixture;system:bareos-fixture"
)
@@ -0,0 +1,15 @@
Device {
Name = FileStorage2
Media Type = File
Archive Device = storage
LabelMedia = yes; # lets Bareos label unlabeled media
Random Access = yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
Description = "File device. A connecting Director must have the same Name and MediaType."
Auto Inflate = both
Auto Deflate = both
Auto Deflate Algorithm = gzip

}
36 changes: 36 additions & 0 deletions systemtests/tests/bareos-basic/testrunner-bcopy-autoxflate
@@ -0,0 +1,36 @@
#!/bin/bash
set -e
set -o pipefail
set -u
set -x

# run bls and make sure it works (with autoxflate plugin)
TestName="$(basename "$(pwd)")"
export TestName


#shellcheck source=../environment.in
. ./environment

#shellcheck source=../scripts/functions
. "${rscripts}"/functions
start_test

JobName=backup-bareos-fd

run_bcopy -v -i TestVolume001 -o TestVolume002 FileStorage FileStorage2
ret=$?
if [ $ret -ne 0 ]; then
echo "bcopy exit code: $ret"
stop_bareos
exit $ret
fi

if ! grep -q "bcopy: stored/bcopy.cc:253-0 . Jobs copied. .*records copied." "$tmp/bcopy.out"; then
echo 'Expected string \"weird-files/dangling-link\" not found in bcopy output'
stop_bareos
exit 1
fi


end_test
Expand Up @@ -25,6 +25,7 @@ messages
@$out $tmp/log1.out
setdebug level=100 storage=File
label volume=TestVolume001 storage=File pool=Full
label volume=TestVolume002 storage=File pool=Full
run job=$JobName yes
status director
status client
Expand Down

0 comments on commit 057ccf1

Please sign in to comment.