]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/migration-time-test
Merge branch 'master' of ssh://bacula.git.sourceforge.net/gitroot/bacula/bacula
[bacula/bacula] / regress / tests / migration-time-test
index a1846e447deca2c71f1eccfc9caf328b519e8a95..c88613390071b2c99b54d8cf7a4c2b58c28f5585 100755 (executable)
@@ -30,15 +30,18 @@ cat <<END_OF_DATA >${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
+update volume=FileVolume002 VolStatus=Used
+@sleep 3
 llist jobid=2,3
 list jobs
 list volumes
@@ -50,7 +53,6 @@ messages
 wait
 list jobs
 list volumes
-purge volume=FileVolume001
 @# 
 @# now do a restore
 @#
@@ -70,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