X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fmigration-time-test;h=c88613390071b2c99b54d8cf7a4c2b58c28f5585;hb=7d5eacc922052324417c82382d6a18e8054245e8;hp=99de021cf2bf733c63ee4bfd1566281ab1eb0172;hpb=cdae8931ba557fe18fa330660b6e47a09c4e5b5a;p=bacula%2Fbacula diff --git a/regress/tests/migration-time-test b/regress/tests/migration-time-test index 99de021cf2..c886133900 100755 --- a/regress/tests/migration-time-test +++ b/regress/tests/migration-time-test @@ -12,7 +12,7 @@ JobName=MigrationJobSave scripts/cleanup scripts/copy-migration-confs -scripts/prepare-two-disks +scripts/prepare-disk-changer echo "${cwd}/build" >${cwd}/tmp/file-list change_jobname NightlySave $JobName @@ -30,27 +30,27 @@ cat <${cwd}/tmp/bconcmds messages @$out ${cwd}/tmp/log1.out label storage=File volume=FileVolume001 Pool=Default +label storage=File volume=FileVolume002 Pool=Special label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0 list volumes @# run three jobs -run job=$JobName level=Full yes +run job=$JobName pool=Special level=Full yes run job=$JobName level=Full yes run job=$JobName level=Full yes wait update volume=FileVolume001 VolStatus=Used -sql -update Job SET RealEndTime='2004-01-01 12:01:01' WHERE JobId IN (2,3); - +update volume=FileVolume002 VolStatus=Used +@sleep 3 llist jobid=2,3 list jobs list volumes +@#setdebug level=20 dir @# should migrate only jobid=2 and 3 run job=migrate-time yes wait messages wait -purge volume=FileVolume001 list jobs list volumes @# @@ -72,6 +72,19 @@ run_bacula check_for_zombie_jobs storage=File stop_bacula +for i in 1 2 3; do + get_mig_info $i ${cwd}/tmp/log1.out + + if [ "$i" -eq 1 -a -n "$RET" ]; then + bstat=2 + print_debug "The first job should not have been copied" + + elif [ "$i" -ne 1 -a -z "$RET" ]; then + bstat=2 + print_debug "Other job should have been copied" + fi +done + check_two_logs check_restore_diff end_test