From: Eric Bollengier Date: Mon, 13 Dec 2010 14:17:41 +0000 (+0100) Subject: regress: Add test having fileset without md5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=287f5f24b214a107803b106caa8813a82617e1c8;p=bacula%2Fbacula regress: Add test having fileset without md5 --- diff --git a/regress/tests/no-chksum-test b/regress/tests/no-chksum-test new file mode 100755 index 0000000000..faedfd5b7a --- /dev/null +++ b/regress/tests/no-chksum-test @@ -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 <$tmp/bconcmds +@$out /dev/null +messages +@$out $tmp/log1.out +label volume=TestVolume001 storage=File pool=File +END_OF_DATA + +run_bacula + +cat <$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 <$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