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