]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Fix prune-migration-test with new copy/migration selection algorithm
authorEric Bollengier <eric@baculasystems.com>
Wed, 3 Feb 2021 15:42:22 +0000 (16:42 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 4 Feb 2021 14:53:59 +0000 (15:53 +0100)
regress/tests/prune-migration-test

index 9f10f357568e4097455b08c6cdd23a7ce3112261..60da5b6bf6f450a7ffce1a3b52978c2b3713cef3 100755 (executable)
@@ -38,7 +38,6 @@ cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @output /dev/null
 messages
 @$out ${cwd}/tmp/log1.out
-setdebug level=100 storage=File
 label storage=File volume=FileVolume001 Pool=Default
 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
@@ -72,13 +71,13 @@ messages
 @$out $cwd/tmp/log10.out
 setdebug level=1 director
 sql
-SELECT JobId, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
+SELECT JobId, Name, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
 
 list jobs
 prune jobs yes
 list jobs
 sql
-SELECT JobId, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
+SELECT JobId, Name, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
 
 @$out $cwd/tmp/log11.out
 sql
@@ -119,10 +118,15 @@ check_restore_diff
 # So, we get it from the job list to exclude it and build the check_prune_list
 id=`awk '/ [0-9] / { print $2 }' $tmp/log11.out`
 
+if [ "$id" = "" ]; then
+    print_debug "ERROR: Unable to determine the id in $tmp/log11.out"
+    estat=1
+fi
+
 jobid=1
-for i in `seq 2 9`
+for i in `seq 2 7`
 do
-    if [ $i != $id ]; then
+    if [ "$i" != "$id" ]; then
         jobid="$jobid,$i"
     fi
 done