#!/bin/sh # # TestName="action-on-purge-test" JobName=AOP . scripts/functions cwd=`pwd` scripts/cleanup scripts/copy-test-confs echo $src > $tmp/file-list sed 's/Pool Type = Backup/Pool Type = Backup; ActionOnPurge = Truncate/' $conf/bacula-dir.conf > $tmp/1 cp $tmp/1 $conf/bacula-dir.conf change_jobname CompressedTest $JobName start_test cat >tmp/bconcmds < 4096)" if [ $? != 0 ]; then print_debug `ls -l $tmp/TestVolume001` bstat=2 fi perl -e "die 'Volume size too small' if (-s '$tmp/TestVolume002' < 4096)" if [ $? != 0 ]; then print_debug `ls -l $tmp/TestVolume002` bstat=2 fi print_debug "Test if Pool record is ok" r=`awk '/Default/ { print $4 }' $tmp/log4.out` if [ "$r" != 1 ]; then print_debug "ActionOnPurge on Pool record should be 1" bstat=2 fi print_debug "Test TestVolume001 if Media record is ok" r=`awk '/TestVolume001/ { print $4 }' $tmp/log4.out` if [ "$r" != 1 ]; then print_debug "ActionOnPurge on Media record should be 1" bstat=2 fi print_debug "Test TestVolume002 if Media record is ok" r=`awk '/TestVolume002/ { print $4 }' $tmp/log4.out` if [ "$r" != 0 ]; then print_debug "ActionOnPurge on Media record should be 0" bstat=2 fi end_test