Skip to content

Commit

Permalink
systemtests: improve volume-prune test
Browse files Browse the repository at this point in the history
Issue #1257: Prune volume command may crash the director

The test now also runs manual pruning and checks that the job-message
emitted contains the correct volume name.
  • Loading branch information
arogge committed Jun 25, 2020
1 parent d993dc7 commit 3964c95
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion systemtests/tests/volume-pruning/testrunner
Expand Up @@ -58,6 +58,14 @@ restore client=bareos-fd fileset=SelfTest where=$tmp/bareos-restores select all
yes
wait
messages
@$out $tmp/log2.out
@#
@# now prune using the commandline
@#
@sleep 6
prune volume=TestVolume001 yes
messages
quit
END_OF_DATA

Expand All @@ -67,6 +75,15 @@ stop_bareos

check_two_logs

grep "Purging the following JobIds: 1,2,3,4,5,6" "$tmp"/log1.out || estat=1
if ! grep "Purging the following JobIds: 1,2,3,4,5,6" "$tmp"/log1.out; then
echo "Pruned jobs don't match expectations." >&2
estat=1
fi

if ! grep -F 'Volume "TestVolume001" contains no jobs after pruning.' \
$tmp/log2.out; then
echo "Pruning message is wrong." >&2
estat=1
fi

end_test

0 comments on commit 3964c95

Please sign in to comment.