]> git.sur5r.net Git - bacula/bacula/commitdiff
regress: Add test having fileset without md5
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 13 Dec 2010 14:17:41 +0000 (15:17 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:39:47 +0000 (14:39 +0200)
regress/tests/no-chksum-test [new file with mode: 0755]

diff --git a/regress/tests/no-chksum-test b/regress/tests/no-chksum-test
new file mode 100755 (executable)
index 0000000..faedfd5
--- /dev/null
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory without
+# md5 signature then restore it.
+#
+TestName="no-chksum-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%  signature =%# signature =%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
+label volume=TestVolume001 storage=File pool=File
+END_OF_DATA
+
+run_bacula
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out $tmp/log1.out
+run job=$JobName yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bconsole
+
+#
+# Now do a second backup after making a few changes
+#
+touch ${cwd}/build/po/fr.po
+#
+
+run_bconsole
+
+dd if=/dev/zero of=$cwd/build/bigfile count=500000 > /dev/null
+
+run_bconsole
+
+rm -f $cwd/build/bigfile 
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out /dev/null
+messages
+@$out $tmp/log1.out
+@# don't restore the bigfile, and try to see if it reads the whole volume
+list files jobid=3
+delete jobid=3
+@# 
+@# now do a restore
+@#
+@$out $tmp/log2.out  
+setdebug level=150 trace=1 storage=File
+restore where=$tmp/bacula-restores select all done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bconsole
+
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test