From b51e0316f7b19494296a51ac70d2cdc9c294efb0 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 2 Aug 2010 10:57:00 +0200 Subject: [PATCH] regress: tweak prune tests --- regress/tests/prune-copy-test | 28 +++++++++++++++++++++++++--- regress/tests/prune-migration-test | 7 +++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/regress/tests/prune-copy-test b/regress/tests/prune-copy-test index da63f41119..86a6dae474 100755 --- a/regress/tests/prune-copy-test +++ b/regress/tests/prune-copy-test @@ -55,7 +55,6 @@ list jobs list volumes wait messages -@$out ${cwd}/tmp/log3.out @# @# Now do another backup, but level Incremental @# @@ -65,7 +64,27 @@ messages @# @# This final job that runs should be Incremental and @# not upgraded to full. +@exec "touch $cwd/build/po/fr.po" +run job=$JobName level=Incremental yes +wait +messages +@$out ${cwd}/tmp/log10.out +@sleep 1 +list jobs +prune jobs yes list jobs +@################################################################ +@# now do a restore +@# +@$out ${cwd}/tmp/log2.out +list volumes +restore where=${cwd}/tmp/bacula-restores select +unmark * +mark * +done +yes +list volumes +wait messages quit END_OF_DATA @@ -74,8 +93,8 @@ run_bacula check_for_zombie_jobs storage=File stop_bacula -touch $tmp/log2.out check_two_logs +check_restore_diff # Now we will verify that the pruning code is working as expected. Each time, # we run 'list jobs', 'prune', 'list jobs'. check_prune_list ensures that jobids @@ -83,7 +102,10 @@ check_two_logs # them (same number), and checks that the last 'list jobs' doesn't contain them # anymore. See scripts/functions.pm for details. -$bperl -e "check_prune_list('$tmp/log3.out',1,3,4,5,6,7)" +# Copy jobs are pruned like normal jobs after the Job Retention period +# the admin 'c'opy job should also be pruned +# F F c c C C I0 I -> F I +$bperl -e "check_prune_list('$tmp/log10.out',1,3,4,5,6,7)" estat=$(($estat + $?)) end_test diff --git a/regress/tests/prune-migration-test b/regress/tests/prune-migration-test index 972d3621cb..251ae5125e 100755 --- a/regress/tests/prune-migration-test +++ b/regress/tests/prune-migration-test @@ -62,10 +62,8 @@ wait messages @sleep 1 @################################################################ -@$out $cwd/tmp/log3.out +@$out $cwd/tmp/log10.out @# -@# This final job that runs should be Incremental and -@# not upgraded to full. list jobs prune jobs yes list jobs @@ -98,7 +96,8 @@ check_restore_diff # them (same number), and checks that the last 'list jobs' doesn't contain them # anymore. See scripts/functions.pm for details. -$bperl -e "check_prune_list('$tmp/log3.out',1,2,3,4,5,7)" +# M M g g F F I0 -> F +$bperl -e "check_prune_list('$tmp/log10.out',1,2,3,4,5,7)" estat=$(($estat + $?)) end_test -- 2.39.2