]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-voltocat-test
regress: Add test to reproduce #3284 with reload command
[bacula/bacula] / regress / tests / verify-voltocat-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 a simple backup of the Bacula build directory
9 #   then verify the Volume to the catalog.           
10 #
11 TestName="verify-voltocat-test"
12 JobName=VerifyVol
13 . scripts/functions
14
15 cwd=`pwd`
16 scripts/cleanup
17 scripts/copy-test-confs
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19
20 change_jobname NightlySave $JobName
21 start_test
22
23 cat <<END_OF_DATA >tmp/bconcmds
24 @output /dev/null
25 messages
26 @$out tmp/log0.out
27 setdebug level=1 storage=File sd
28 label storage=File volume=TestVolume001
29 run level=full job=$JobName yes
30 wait
31 messages
32 @$out tmp/log1.out
33 run level=full job=$JobName yes
34 wait
35 messages
36 @# 
37 @# now do a verify to catalog
38 @#
39 @$out ${cwd}/tmp/log2.out
40 setdebug level=12 dir
41 run job=VerifyVolume level=VolumeToCatalog
42 yes
43 wait
44 messages
45 @$out ${cwd}/tmp/log4.out
46 setdebug level=12 dir
47 run job=VerifyVolume jobid=1 level=VolumeToCatalog
48 yes
49 wait
50 messages
51 @$out ${cwd}/tmp/log3.out
52 @#
53 @# Now a backup with nothing changed
54 run job=$JobName level=Incremental yes
55 wait
56 messages
57 run job=VerifyVolume level=VolumeToCatalog
58 yes
59 wait
60 messages
61 quit
62 END_OF_DATA
63
64 run_bacula
65
66 sleep 2
67 check_for_zombie_jobs storage=File 
68 stop_bacula
69
70 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
71 bstat=$?
72 grep "^  Termination: *Verify OK" tmp/log2.out 2>&1 >/dev/null
73 rstat=$?
74 grep "^  Termination: *Verify OK" tmp/log3.out 2>&1 >/dev/null
75 dstat=$?
76 grep "Verify JobId: *2" tmp/log2.out 2>&1 >/dev/null
77 dstat=$(($dstat + $?))
78 grep "Verify JobId: *1" tmp/log4.out 2>&1 >/dev/null
79 dstat=$(($dstat + $?))
80 grep "Verify Job: *VerifyVol" tmp/log4.out 2>&1 >/dev/null
81 dstat=$(($dstat + $?))
82
83 end_test