]> git.sur5r.net Git - bacula/bacula/commitdiff
add test for bad messages ressource
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 23 Oct 2009 14:23:17 +0000 (16:23 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 23 Oct 2009 14:23:17 +0000 (16:23 +0200)
regress/tests/messages-test [new file with mode: 0755]

diff --git a/regress/tests/messages-test b/regress/tests/messages-test
new file mode 100755 (executable)
index 0000000..8409398
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory
+#   then restore it.
+#
+TestName="messages-test"
+JobName=backup
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-confs
+
+#
+# Zap out any schedule in default conf file so that
+#  it doesn't start during our test
+#
+outf="$tmp/sed_tmp"
+echo "s%  Schedule =%# Schedule =%g" >$outf
+echo 's%append = "%append = "/nowhere%g' >> $outf
+echo 's%mailcommand = "%mailcommand = "/nowhere%g' >> $outf
+cp $scripts/bacula-dir.conf $tmp/1
+sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
+
+change_jobname BackupClient1 $JobName
+start_test
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out /dev/null
+messages
+@$out $tmp/log1.out
+setdebug level=100 storage=File
+label volume=TestVolume001 storage=File pool=File
+run job=$JobName yes
+@sleep 1
+status storage=File
+wait
+messages
+@# 
+@# now do a restore
+@#
+@$out $tmp/log2.out  
+restore where=$tmp/bacula-restores select all done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test