]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/messages-test
add test for bad messages ressource
[bacula/bacula] / regress / tests / messages-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then restore it.
5 #
6 TestName="messages-test"
7 JobName=backup
8 . scripts/functions
9
10 scripts/cleanup
11 scripts/copy-confs
12
13 #
14 # Zap out any schedule in default conf file so that
15 #  it doesn't start during our test
16 #
17 outf="$tmp/sed_tmp"
18 echo "s%  Schedule =%# Schedule =%g" >$outf
19 echo 's%append = "%append = "/nowhere%g' >> $outf
20 echo 's%mailcommand = "%mailcommand = "/nowhere%g' >> $outf
21 cp $scripts/bacula-dir.conf $tmp/1
22 sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
23
24 change_jobname BackupClient1 $JobName
25 start_test
26
27 cat <<END_OF_DATA >$tmp/bconcmds
28 @$out /dev/null
29 messages
30 @$out $tmp/log1.out
31 setdebug level=100 storage=File
32 label volume=TestVolume001 storage=File pool=File
33 run job=$JobName yes
34 @sleep 1
35 status storage=File
36 wait
37 messages
38 @# 
39 @# now do a restore
40 @#
41 @$out $tmp/log2.out  
42 restore where=$tmp/bacula-restores select all done
43 yes
44 wait
45 messages
46 quit
47 END_OF_DATA
48
49 run_bacula
50 check_for_zombie_jobs storage=File
51 stop_bacula
52
53 check_two_logs
54 check_restore_diff
55 end_test