]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-voltocat-test
regress: add bconsole test
[bacula/bacula] / regress / tests / verify-voltocat-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then verify the Volume to the catalog.           
5 #
6 TestName="verify-voltocat-test"
7 JobName=VerifyVol
8 . scripts/functions
9
10 cwd=`pwd`
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "${cwd}/build" >${cwd}/tmp/file-list
14
15 change_jobname NightlySave $JobName
16 start_test
17
18 cat <<END_OF_DATA >tmp/bconcmds
19 @$out /dev/null
20 messages
21 @$out tmp/log1.out
22 setdebug level=1 storage=File sd
23 label storage=File volume=TestVolume001
24 run job=$JobName yes
25 wait
26 messages
27 @# 
28 @# now do a verify to catalog
29 @#
30 @$out ${cwd}/tmp/log2.out
31 setdebug level=12 dir
32 run job=VerifyVolume level=VolumeToCatalog
33 yes
34 wait
35 messages
36 @$out ${cwd}/tmp/log3.out
37 @#
38 @# Now a backup with nothing changed
39 run job=$JobName level=Incremental yes
40 wait
41 messages
42 run job=VerifyVolume level=VolumeToCatalog
43 yes
44 wait
45 messages
46 quit
47 END_OF_DATA
48
49 run_bacula
50
51 sleep 2
52 check_for_zombie_jobs storage=File 
53 stop_bacula
54
55 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
56 bstat=$?
57 grep "^  Termination: *Verify OK" tmp/log2.out 2>&1 >/dev/null
58 rstat=$?
59 grep "^  Termination: *Verify OK" tmp/log3.out 2>&1 >/dev/null
60 dstat=$?
61 end_test