]> git.sur5r.net Git - bacula/bacula/commitdiff
Improve plugin test -- more to be done
authorKern Sibbald <kern@sibbald.com>
Mon, 29 Sep 2008 14:48:20 +0000 (14:48 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 29 Sep 2008 14:48:20 +0000 (14:48 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7663 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/plugin-test-bacula-dir.conf.in
regress/tests/plugin-test

index 0625b18b10e5989b9e3d96af09a0bac62b351efe..dc30fed24eaa1e602ed481899a1b144b95ca8bdf 100644 (file)
@@ -223,6 +223,7 @@ FileSet {
     }
     File = <@tmpdir@/file-list
     Plugin = "bpipe:/@bpipe@/encrypt-bug.jpg:cat @builddir@/../encrypt-bug.jpg:cat >@tmpdir@/encrypt-bug.jpg"
+    Plugin = "bpipe:/@bpipe@/Makefile:cat @builddir@/../Makefile:cat >@tmpdir@/Makefile"
   }
 }
 
index cc7c5d7d8ce98e3547bfe0bcbbe22e78c485510b..98878267808e824734983fedbce89bff0dde2538 100755 (executable)
@@ -9,7 +9,8 @@ JobName=pluginTest
 scripts/cleanup
 scripts/copy-plugin-confs
 file=encrypt-bug.jpg
-echo "${cwd}/${file}" >${cwd}/tmp/file-list
+rm -rf ${cwd}/tmp/*
+echo "${cwd}/README" >${cwd}/tmp/file-list
 
 start_test
 
@@ -29,7 +30,6 @@ END_OF_DATA
 run_bacula -d50
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
 messages
 @# 
 @# now do a restore
@@ -44,13 +44,48 @@ messages
 quit
 END_OF_DATA
 
+run_bconsole
+
+stop_bacula
+
+# ****FIXME**** test if the restore of the two files is OK
+
+#
+# Remove plugin so we can try the restore without the plugin
+#
+mv -f ${cwd}/bin/plugins/bpipe-fd.so ${cwd}/bin/plugins/bpipe-fd.sox
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out ${cwd}/tmp/log2.out
+@# remove plugin
+@exec "sh -c 'rm -f ${cwd}/bin/plugins/bpipe-fd.so'"
+@# 
+@# now do a restore without the plugin
+@#
+@$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_bacula -d50
 run_bconsole
 
 check_for_zombie_jobs storage=File1
 stop_bacula
+#
+# Restore plugin
+#
+mv -f ${cwd}/bin/plugins/bpipe-fd.sox ${cwd}/bin/plugins/bpipe-fd.so
 
 check_two_logs
+#
+# ****FIXME**** test that all three files are restored correctly
+#
 diff ${cwd}/${file} ${cwd}/tmp/${file}
 dstat=$?
 end_test