]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/maxuseduration-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / maxuseduration-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 # Run four jobs at the same time, with four Volumes, but set
7 #   Maximum Job Volumes = 1 on each of the Volumes.  Note,
8 #   Volume 2 will probably have two jobs on it.  Something to
9 #   be fixed in a later version.
10 #
11 TestName="maxuseduration-test"
12 JobName=maxuseduration
13 . scripts/functions
14
15 scripts/cleanup
16 scripts/copy-test-confs
17 echo "${cwd}/build" >${cwd}/tmp/file-list
18
19 change_jobname NightlySave $JobName
20 start_test
21
22 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
23 @output /dev/null
24 messages
25 @$out   ${cwd}/tmp/log1.out
26 label storage=File1 volume=TestVolume001
27 update Volume=TestVolume001
28 3
29 20
30 1
31 3
32 19
33 llist volume=TestVolume001
34 @#setdebug level=100 Storage=File1
35 run job=$JobName level=Full Storage=File1 yes
36 @sleep 30
37 update Volume=TestVolume001
38 1
39 1
40 19
41 mount storage=File1
42 wait
43 llist volume=TestVolume001
44 messages
45 quit
46 END_OF_DATA
47
48 run_bacula
49 check_for_zombie_jobs storage=File1
50 stop_bacula
51
52 grep "Max configured use duration" ${cwd}/tmp/log1.out
53 if [ $? -eq 0 ] ; then
54    echo "Error: max configured use duration exceeded"
55    estat=1
56 fi
57 end_test