]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/messages-test
Fix deadlock detection to work in daemon mode
[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 scripts/cleanup
13 scripts/copy-confs
14
15 #
16 # Zap out any schedule in default conf file so that
17 #  it doesn't start during our test
18 #
19 outf="$tmp/sed_tmp"
20 echo "s%  Schedule =%# Schedule =%g" >$outf
21
22 # tweak all Messages {} with non valid path
23 echo 's%append = "%append = "/nowhere%g' >> $outf
24 echo 's%mailcommand = "%mailcommand = "/nowhere%g' >> $outf
25
26 cp $scripts/bacula-dir.conf $tmp/1
27 sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
28
29 change_jobname BackupClient1 $JobName
30 start_test
31
32 cat <<END_OF_DATA >$tmp/bconcmds
33 @$out /dev/null
34 messages
35 @$out $tmp/log1.out
36 @#setdebug level=100 storage=File
37 label volume=TestVolume001 storage=File pool=File
38 run job=$JobName yes
39 @sleep 1
40 status storage=File
41 wait
42 messages
43 @# 
44 @# now do a restore
45 @#
46 @$out $tmp/log2.out  
47 restore where=$tmp/bacula-restores select all done
48 yes
49 wait
50 messages
51 quit
52 END_OF_DATA
53
54 run_bacula
55 check_for_zombie_jobs storage=File
56 stop_bacula
57
58 check_two_logs
59 check_restore_diff
60 end_test