]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/messages-test
Turn off messages test -- it creates tons of emails
[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 # We have bad configuration for Messages resources, everything
6 # should work
7 #
8 TestName="messages-test"
9 JobName=backup
10 . scripts/functions
11
12 # turn off until the email problem is solved
13 exit 0
14
15 scripts/cleanup
16 scripts/copy-confs
17 change_jobname BackupClient1 $JobName
18 start_test
19 #
20 # Zap out any schedule in default conf file so that
21 #  it doesn't start during our test
22 #
23 outf="$tmp/sed_tmp"
24 echo "s%  Schedule =%# Schedule =%g" >$outf
25
26 # tweak all Messages {} with non valid path
27 echo 's%append = "%append = "/nowhere%g' >> $outf
28 echo "s%bsmtp -h $SMTP_HOST%bsmtp -h nonvalidhost%g" >> $outf
29 echo 's%# mail%  mail%' >> $outf
30 #echo 's%mailcommand = "%mailcommand = "/nowhere%g' >> $outf
31
32 cp $scripts/bacula-dir.conf $tmp/1
33 sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
34
35
36 cat <<END_OF_DATA >$tmp/bconcmds
37 @$out /dev/null
38 messages
39 @$out $tmp/log1.out
40 @#setdebug level=100 storage=File
41 label volume=TestVolume001 storage=File pool=File
42 run job=$JobName yes
43 @sleep 1
44 status storage=File
45 wait
46 messages
47 @# 
48 @# now do a restore
49 @#
50 @$out $tmp/log2.out  
51 restore where=$tmp/bacula-restores select all done
52 yes
53 wait
54 messages
55 quit
56 END_OF_DATA
57
58 run_bacula
59 check_for_zombie_jobs storage=File
60 stop_bacula
61
62 check_two_logs
63 check_restore_diff
64 end_test