From 10c207d1c0ddfbaeba2b306f1e2b4d88d8d01607 Mon Sep 17 00:00:00 2001 From: Philipp Storz Date: Tue, 6 Sep 2016 13:05:22 +0200 Subject: [PATCH] first version of tests/sparse-autoxflate-test for bug 694 --- tests/sparse-autoxflate-test | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 tests/sparse-autoxflate-test diff --git a/tests/sparse-autoxflate-test b/tests/sparse-autoxflate-test new file mode 100755 index 0000000..977dfa5 --- /dev/null +++ b/tests/sparse-autoxflate-test @@ -0,0 +1,64 @@ +#!/bin/sh +# +# Run a simple backup of the Bareos build directory using the Sparse option +# then restore it. +# +TestName="sparse-autoxflate-test" +JobName=SparseTest +. scripts/functions + +scripts/cleanup +scripts/copy-test-confs +echo "${cwd}/build" >${cwd}/tmp/file-list + + + +mv ${cwd}/bin/bareos-sd.conf ${cwd}/bin/bareos-sd.conf.sed + +# enable autoxflate plugin +sed 's@# Maximum File Size = 10KB@# autoxflate plugin settings\ + autodeflate = both # in/out/both\ + autodeflatealgorithm = gzip # gzip / lzo / lzfast / lz4 / lz4hc\ + # autodeflatelevel = 6 # compression level for gzip\ + autoinflate = both # in/out/both\ +@g' < ${cwd}/bin/bareos-sd.conf.sed > ${cwd}/bin/bareos-sd.conf + + +# enable plugin directory +mv ${cwd}/bin/bareos-sd.conf ${cwd}/bin/bareos-sd.conf.sed +# enable autoxflate plugin +sed 's@Pid Directory.*@\ +Plugin Directory =\"'"${cwd}"'/bin/plugins\"\ +@g' < ${cwd}/bin/bareos-sd.conf.sed > ${cwd}/bin/bareos-sd.conf + +start_test + +cat >${cwd}/tmp/bconcmds <