Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemtests: introduce testrunner-bcopy-autoxflate
- Loading branch information
Showing
5 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/bin/bash | ||
set -u | ||
|
||
#shellcheck source=../environment.in | ||
. ./environment | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
systemtests/tests/bareos-basic/etc/bareos/bareos-sd.d/device/FileStorage2.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
36
systemtests/tests/bareos-basic/testrunner-bcopy-autoxflate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters