Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
systemtests: improve volume-prune test
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.

(cherry picked from commit 3964c95)
  • Loading branch information
arogge committed Jun 29, 2020
1 parent ef2a676 commit 0534c11
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion systemtests/tests/volume-pruning-test/testrunner
Expand Up @@ -57,6 +57,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 @@ -66,6 +74,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 0534c11

Please sign in to comment.