From a9556db2db0a102105e87db50901f229967943c8 Mon Sep 17 00:00:00 2001 From: Joerg Steffens Date: Mon, 11 Dec 2017 19:04:27 +0100 Subject: [PATCH] action-on-purge-test: backup ${tmp}/data Don't backup ${src}, as this directory is not always available. --- tests/action-on-purge-test | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/action-on-purge-test b/tests/action-on-purge-test index 4c1f109..0ea3c9f 100755 --- a/tests/action-on-purge-test +++ b/tests/action-on-purge-test @@ -1,19 +1,33 @@ #!/bin/sh # # + +. scripts/functions + TestName="action-on-purge-test" JobName=FIFOTest -. scripts/functions -cwd=`pwd` +# Directory to backup. +# This directory will be created by setup_data(). +# If set, $BackupDirectory will be used +# as base directory by check_restore_diff(). +# Don't use a "/" at the end of the directory path, +# as it might cause problems +# (filenames given as parameter to restore must match 100%. "//" are not identical with "/"). +BackupDirectory="${tmp}/data" + + scripts/cleanup scripts/copy-test-confs -echo $src > $tmp/file-list - sed 's/Pool Type = Backup/Pool Type = Backup; ActionOnPurge = Truncate/' $conf/bareos-dir.conf > $tmp/1 cp $tmp/1 $conf/bareos-dir.conf +# Use a tgz to setup data to be backuped. +# Data will be placed at "${tmp}/data". +setup_data data/small.tgz + + start_test cat >tmp/bconcmds <