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