Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemtests: update parallel-jobs test
- Loading branch information
1 parent
52d7fc1
commit c66a0e1
Showing
7 changed files
with
167 additions
and
116 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
systemtests/tests/parallel-jobs/etc/bareos/bareos-dir.d/job/slow-backup-big-volume.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,13 @@ | ||
Job { | ||
Name = "slow-backup-big-volume" | ||
Type = Backup | ||
Level = Full | ||
Client = bareos-fd | ||
FileSet = "SelfTest" | ||
Storage = File | ||
Messages = Standard | ||
Pool = Full | ||
Full Backup Pool = Full | ||
Maximum Bandwidth = 50K | ||
MaximumConcurrentJobs = 10 | ||
} |
13 changes: 13 additions & 0 deletions
13
systemtests/tests/parallel-jobs/etc/bareos/bareos-dir.d/job/slow-backup-small-volumes.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,13 @@ | ||
Job { | ||
Name = "slow-backup-small-volumes" | ||
Type = Backup | ||
Level = Full | ||
Client = bareos-fd | ||
FileSet = "SelfTest" | ||
Storage = File | ||
Messages = Standard | ||
Pool = SmallFull | ||
Full Backup Pool = SmallFull | ||
Maximum Bandwidth = 50K | ||
MaximumConcurrentJobs = 10 | ||
} |
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
This file was deleted.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
systemtests/tests/parallel-jobs/parallel-jobs-small-volumes
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,70 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
set -u | ||
# | ||
# Run multiple backups in parallel in small volumes and | ||
# then restore them. | ||
# | ||
TestName="$(basename "$(pwd)")" | ||
export TestName | ||
|
||
#shellcheck source=../environment.in | ||
. ./environment | ||
|
||
#shellcheck source=../scripts/functions | ||
. "${rscripts}"/functions | ||
|
||
start_test | ||
|
||
backupjob="slow-backup-small-volumes" | ||
parallelbackuplog="$tmp/small-volumes-parallel-backup.out" | ||
parallelrestorelog="$tmp/small-volumes-parallel-restore.out" | ||
|
||
cat <<END_OF_DATA >"$tmp/bconcmds" | ||
@$out /dev/null | ||
messages | ||
@$out $parallelbackuplog | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
wait | ||
messages | ||
@$out $parallelrestorelog | ||
restore jobid=13 where=$tmp/restore13 all done yes | ||
wait | ||
restore jobid=14 where=$tmp/restore14 all done yes | ||
wait | ||
restore jobid=15 where=$tmp/restore15 all done yes | ||
wait | ||
restore jobid=16 where=$tmp/restore16 all done yes | ||
wait | ||
restore jobid=17 where=$tmp/restore17 all done yes | ||
wait | ||
restore jobid=18 where=$tmp/restore18 all done yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bconsole | ||
|
||
if [[ $(grep -c "Termination:.*Backup OK" "$parallelbackuplog") -ne "6" ]]; then | ||
echo "Not all backups jobs finished successfully." | ||
estat=1 | ||
fi | ||
|
||
if [[ $(grep -c "Termination:.*Restore OK" "$parallelrestorelog") -ne "6" ]]; then | ||
echo "Not all restore jobs finished successfully." | ||
estat=2 | ||
fi | ||
|
||
for i in {13..18}; do | ||
restoredir="$tmp/restore$i" | ||
check_restore_diff "${BackupDirectory}" "$restoredir" | ||
done | ||
|
||
end_test |
This file was deleted.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
systemtests/tests/parallel-jobs/testrunner-parallel-jobs-big-volume
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,70 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
set -u | ||
# | ||
# Run multiple backups in parallel and | ||
# then restore them. | ||
# | ||
TestName="$(basename "$(pwd)")" | ||
export TestName | ||
|
||
#shellcheck source=../environment.in | ||
. ./environment | ||
|
||
#shellcheck source=../scripts/functions | ||
. "${rscripts}"/functions | ||
|
||
start_test | ||
|
||
backupjob="slow-backup-big-volume" | ||
parallelbackuplog="$tmp/big-volumes-parallel-backup.out" | ||
parallelrestorelog="$tmp/big-volume-parallel-restore.out" | ||
|
||
cat <<END_OF_DATA >"$tmp/bconcmds" | ||
@$out /dev/null | ||
messages | ||
@$out $parallelbackuplog | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
run job=${backupjob} level=Full yes | ||
wait | ||
messages | ||
@$out $parallelrestorelog | ||
restore jobid=1 where=$tmp/restore1 all done yes | ||
wait | ||
restore jobid=2 where=$tmp/restore2 all done yes | ||
wait | ||
restore jobid=3 where=$tmp/restore3 all done yes | ||
wait | ||
restore jobid=4 where=$tmp/restore4 all done yes | ||
wait | ||
restore jobid=5 where=$tmp/restore5 all done yes | ||
wait | ||
restore jobid=6 where=$tmp/restore6 all done yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bconsole | ||
|
||
if [[ $(grep -c "Termination:.*Backup OK" "$parallelbackuplog") -ne "6" ]]; then | ||
echo "Not all backups jobs finished successfully." | ||
estat=1 | ||
fi | ||
|
||
if [[ $(grep -c "Termination:.*Restore OK" "$parallelrestorelog") -ne "6" ]]; then | ||
echo "Not all restore jobs finished successfully." | ||
estat=2 | ||
fi | ||
|
||
for i in {1..6}; do | ||
restoredir="$tmp/restore$i" | ||
check_restore_diff "${BackupDirectory}" "$restoredir" | ||
done | ||
|
||
end_test |