From: Radoslaw Korzeniewski Date: Wed, 2 Sep 2020 13:30:51 +0000 (+0200) Subject: BEE Backport regress/tests/plugin-handleXACL-test X-Git-Tag: Release-11.3.2~1187 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e53ce51abbdc24a455318d4033fb310913fc6cee;p=thirdparty%2Fbacula.git BEE Backport regress/tests/plugin-handleXACL-test This commit is the result of the squash of the following main commits: Author: Eric Bollengier Date: Wed Dec 6 10:09:21 2017 +0100 regress: Fix plugin-handleXACL-test with MySQL/SQlite Author: Radosław Korzeniewski Date: Thu Nov 16 13:57:37 2017 +0100 regress: Add test for new handleXACLdata Plugin API callback. --- diff --git a/regress/tests/plugin-handleXACL-test b/regress/tests/plugin-handleXACL-test new file mode 100755 index 0000000000..60e7b32348 --- /dev/null +++ b/regress/tests/plugin-handleXACL-test @@ -0,0 +1,81 @@ +#!/bin/sh +# +# Copyright (C) 2000-2015 Kern Sibbald +# License: BSD 2-Clause; see file LICENSE-FOSS +# + +# +# Attempt to backup and restore a file with the bpipe plugin +# +TestName="plugin-handleXACL-test" +JobName=TestPluginHandleXACLTest +. scripts/functions + +scripts/cleanup +scripts/copy-plugin-handleXACL-confs +make -C $src/src/plugins/fd install-test-plugin + +start_test + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log1.out +label storage=File1 volume=TestVolume001 +setdebug level=150 client=$CLIENT +estimate job=$JobName level=Full +setdebug level=50 client=$CLIENT +run job=$JobName storage=File1 yes +wait +status client=$CLIENT +messages +setdebug level=50 trace=0 client=$CLIENT +quit +END_OF_DATA + +run_bacula + +cat <${cwd}/tmp/bconcmds +@$out $tmp/list +llist pluginrestoreconf jobid=2 +@$out $tmp/conf +llist pluginrestoreconf jobid=2 id=2 +END_OF_DATA + +run_bconsole + +grep string1 $tmp/conf + +cat <$tmp/obj +string1="My string" +string2="My other string" +ok=no +EOF + +cat <${cwd}/tmp/bconcmds +messages +@# +@# now do a restore +@# +@$out ${cwd}/tmp/log2.out +setdebug level=50 client=$CLIENT +restore fileset=TestPluginHandleXACLSet where=${cwd}/tmp select all storage=File1 done +yes +wait +setdebug level=0 client=$CLIENT +messages +llist job=RestoreFiles +quit +END_OF_DATA + +run_bconsole + +stop_bacula + +RET=`grep -i "jobstatus:" ${cwd}/tmp/log2.out | awk '{print $2}'` +if [ "x$RET" != "xT" ] +then + rstat=1 +fi + +end_test