Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
433accb
commit d99ee07
Showing
1 changed file
with
57 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
set -u | ||
# | ||
# Run a simple backup | ||
# then restore it. | ||
# | ||
TestName="$(basename "$(pwd)")" | ||
export TestName | ||
|
||
|
||
#shellcheck source=../environment.in | ||
. ./environment | ||
|
||
#shellcheck source=../scripts/functions | ||
. "${rscripts}"/functions | ||
|
||
start_test | ||
|
||
rerun_log=$tmp/rerun.out | ||
JobName=backup-bareos-fd | ||
|
||
rm -f $rerun_log | ||
|
||
cat <<END_OF_DATA >"$tmp/bconcmds" | ||
@$out /dev/null | ||
messages | ||
@$out $rerun_log | ||
setdebug level=100 storage=File | ||
run job=$JobName yes | ||
run job=$JobName yes | ||
wait | ||
rerun jobid=1 yes | ||
wait | ||
rerun jobid=2,3 yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bconsole | ||
|
||
expect_grep "rerunning jobid 1" \ | ||
"$rerun_log" \ | ||
"Job was not rerun." | ||
|
||
expect_grep "rerunning jobid 2" \ | ||
"$rerun_log" \ | ||
"Comma separated jobs were not correctly rerun." | ||
|
||
expect_grep "rerunning jobid 3" \ | ||
"$rerun_log" \ | ||
"Comma separated jobs were not correctly rerun." | ||
|
||
|
||
end_test |