From 1344dc47476631c7068dcf8767be0f5320680d0c Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 17 Jun 2010 10:36:15 +0200 Subject: [PATCH] regress: add more tests to prune-base-job-test --- regress/tests/prune-base-job-test | 67 +++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/regress/tests/prune-base-job-test b/regress/tests/prune-base-job-test index 46748ded7d..7b36499a3e 100755 --- a/regress/tests/prune-base-job-test +++ b/regress/tests/prune-base-job-test @@ -22,7 +22,7 @@ change_jobname BackupClient1 $JobName dircfg=$conf/bacula-dir.conf $bperl -e "add_attribute('$dircfg', 'AutoPrune', 'No', 'Client')" $bperl -e "add_attribute('$dircfg', 'Job Retention', '1s', 'Client')" - +$bperl -e "add_attribute('$dircfg', 'File', '<$tmp/lst', 'FileSet', 'FS_TESTJOB_ADVANCE')" p() { echo "##############################################" >> ${cwd}/tmp/log1.out echo "$*" >> ${cwd}/tmp/log1.out @@ -31,7 +31,9 @@ p() { } +echo ${cwd}/bin > ${cwd}/tmp/lst echo ${cwd}/bin > ${cwd}/tmp/file-list +echo ${cwd}/build >> ${cwd}/tmp/file-list start_test @@ -58,8 +60,6 @@ END_OF_DATA run_bconsole -echo ${cwd}/build >> ${cwd}/tmp/file-list - cat <${cwd}/tmp/bconcmds @$out $tmp/log4.out label volume=TestVolume002 storage=File pool=Default @@ -107,6 +107,55 @@ cat <${cwd}/tmp/bconcmds sql SELECT count(*) FROM BaseFiles; +list jobs +prune jobs yes +list jobs +@$out $tmp/log1.out +@################################################################ +@# This full job will force the purge of the previous one +run job=backup level=full yes +wait +messages +@$out $tmp/log11.out +list jobs +prune jobs yes +list jobs +@$out $tmp/log1.out +@################################################################ +@# This base job will replace the first one after the next full replacement +run job=base_backup level=base yes +wait +messages +@$out $tmp/log12.out +list jobs +prune jobs yes +list jobs +@$out $tmp/log1.out +@################################################################ +@# This full job will force the purge of the previous one +run job=backup level=full yes +wait +messages +@$out $tmp/log13.out +list jobs +prune jobs yes +list jobs +@$out $tmp/log1.out +@################################################################ +@# see with two base jobs (base_backup and backup) +run job=backup level=base yes +wait +messages +@exec "touch $cwd/bin/bacula-dir.conf" +run job=base_backup level=base yes +wait +messages +list jobs +run job=backup level=full yes +wait +messages +list jobs +@$out $tmp/log14.out list jobs prune jobs yes list jobs @@ -117,5 +166,17 @@ run_bconsole $bperl -e "check_job_list('$tmp/log10.out', 3,5,6)" estat=$(($estat + $?)) +$bperl -e "check_job_list('$tmp/log11.out', 2,4,7)" +estat=$(($estat + $?)) + +$bperl -e "check_job_list('$tmp/log12.out')" +estat=$(($estat + $?)) + +$bperl -e "check_job_list('$tmp/log13.out',1,8)" +estat=$(($estat + $?)) + +$bperl -e "check_job_list('$tmp/log14.out',9,10)" +estat=$(($estat + $?)) + stop_bacula end_test -- 2.39.5