]> git.sur5r.net Git - bacula/bacula/commitdiff
regress: Add delta-test test
authorEric Bollengier <eric@eb.homelinux.org>
Sat, 20 Nov 2010 13:24:57 +0000 (14:24 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 25 Nov 2010 13:59:24 +0000 (14:59 +0100)
regress/tests/delta-test [new file with mode: 0755]

diff --git a/regress/tests/delta-test b/regress/tests/delta-test
new file mode 100755 (executable)
index 0000000..a470526
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# Attempt to backup and restore a file with the delta plugin
+#
+
+TestName="delta-test"
+JobName=pluginTest
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-plugin-confs
+
+cat << EOF >> $conf/bacula-dir.conf
+FileSet {
+ Name = "FS_DELTA"
+ Include {
+  Options {
+    signature=MD5
+  }
+ Plugin = "delta-test"
+ }
+}
+EOF
+
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "FileSet", "FS_DELTA", "Job", "pluginTest")'
+
+
+start_test
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+label storage=File volume=TestVolume001
+setdebug level=150 client=$CLIENT
+estimate job=$JobName level=Full
+setdebug level=50 client=$CLIENT
+run job=$JobName yes
+wait
+status client=$CLIENT
+messages
+run job=$JobName level=Incremental yes
+wait
+status client=$CLIENT
+run job=$JobName level=Incremental yes
+wait
+status client=$CLIENT
+quit
+END_OF_DATA
+
+run_bacula
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+messages
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+setdebug level=50 client=$CLIENT
+restore select all done
+yes
+wait
+messages
+@$out ${cwd}/tmp/log3.out
+status client
+setdebug level=0 client=$CLIENT
+quit
+END_OF_DATA
+
+run_bconsole
+
+check_two_logs
+
+stop_bacula
+
+end_test