From: Kern Sibbald Date: Mon, 29 Sep 2008 14:48:20 +0000 (+0000) Subject: Improve plugin test -- more to be done X-Git-Tag: Release-7.0.0~4069 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1450974743cbf2b6c900e4cad024f3ee1f9a33a4;p=bacula%2Fbacula Improve plugin test -- more to be done git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7663 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/scripts/plugin-test-bacula-dir.conf.in b/regress/scripts/plugin-test-bacula-dir.conf.in index 0625b18b10..dc30fed24e 100644 --- a/regress/scripts/plugin-test-bacula-dir.conf.in +++ b/regress/scripts/plugin-test-bacula-dir.conf.in @@ -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" } } diff --git a/regress/tests/plugin-test b/regress/tests/plugin-test index cc7c5d7d8c..9887826780 100755 --- a/regress/tests/plugin-test +++ b/regress/tests/plugin-test @@ -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 <${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 <${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