]> git.sur5r.net Git - bacula/bacula/commitdiff
Add first cut plugin test
authorKern Sibbald <kern@sibbald.com>
Thu, 25 Sep 2008 16:50:45 +0000 (16:50 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 25 Sep 2008 16:50:45 +0000 (16:50 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7640 91ce42f0-d328-0410-95d8-f526ca767f89

regress/tests/plugin-test [new file with mode: 0755]

diff --git a/regress/tests/plugin-test b/regress/tests/plugin-test
new file mode 100755 (executable)
index 0000000..cc7c5d7
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# Attempt to backup and restore a file with the bpipe plugin
+#
+TestName="plugin-test"
+JobName=pluginTest
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-plugin-confs
+file=encrypt-bug.jpg
+echo "${cwd}/${file}" >${cwd}/tmp/file-list
+
+start_test
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@output /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+label storage=File1 volume=TestVolume001
+setdebug level=50 client=$CLIENT
+run job=$JobName storage=File1 yes
+wait
+messages
+quit
+END_OF_DATA
+
+
+run_bacula -d50
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out /dev/null
+messages
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+@#setdebug level=50 client=$CLIENT
+restore where=${cwd}/tmp  select all storage=File1 done
+yes
+wait
+messages
+@$out
+quit
+END_OF_DATA
+
+
+run_bconsole
+
+check_for_zombie_jobs storage=File1
+stop_bacula
+
+check_two_logs
+diff ${cwd}/${file} ${cwd}/tmp/${file}
+dstat=$?
+end_test