]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/faketape-test-changer
ebl rename faketape to vtape
[bacula/bacula] / regress / tests / faketape-test-changer
index 8e5e2f0896bd35886c63d163ac2ea93e189ccd03..93496fc2341c050703d7094b8d190ab6db1ad596 100755 (executable)
@@ -21,13 +21,15 @@ scripts/cleanup
 scripts/copy-tape-confs
 cp scripts/bacula-dir-faketape.conf bin/bacula-dir.conf
 cp scripts/bacula-sd-faketape.conf bin/bacula-sd.conf
-scripts/prepare-big-autochanger
+scripts/prepare-fake-autochanger
 
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 start_test
 
 when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+30))"`
+when2=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+45))"`
+
 clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf`
 
 # Catalog record for cleaning tape "CLN01" successfully created.
@@ -37,9 +39,11 @@ clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @output /dev/null
 messages
-@$out ${cwd}/tmp/log1.out
+@$out ${cwd}/tmp/log6.out
 @#setdebug level=200 storage=LTO1
-label barcodes pool=Scratch slots=1-40 storage=LTO1 drive=3
+label barcodes pool=Scratch slots=1-4 storage=LTO1-ANSI_6 drive=6
+yes
+label barcodes pool=Scratch slots=5-40 storage=LTO1 drive=3
 yes
 messages
 list volumes
@@ -49,29 +53,66 @@ run_bacula
 stop_bacula
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out ${cwd}/tmp/log2.out
+@$out ${cwd}/tmp/log7.out
 label barcodes pool=Scratch slots=41-80 storage=LTO3 drive=0
 yes
 messages
 list volumes
-@$out ${cwd}/tmp/log3.out
+@$out ${cwd}/tmp/log1.out
 run storage=LTO3 when="$when1" job=NightlySave  pool=Inc     yes
 run storage=LTO3 when="$when1" job=NightlySave2 pool=Full    yes
 run storage=LTO3 when="$when1" job=NightlySave1 pool=Default yes
+
 run storage=LTO1 when="$when1" job=NightlySave  pool=Inc     yes
 run storage=LTO1 when="$when1" job=NightlySave2 pool=Full    yes
 run storage=LTO1 when="$when1" job=NightlySave1 pool=Default yes
+run storage=LTO1 when="$when1" job=NightlySave3 pool=Diff    yes
+
+run storage=LTO1-ANSI_6 when="$when2" job=NightlySave  pool=Inc     yes
 wait
 messages
+quit
 END_OF_DATA
 
 run_bacula
+check_for_zombie_jobs storage=LTO1 $clientname
+check_for_zombie_jobs storage=LTO3 $clientname
+check_for_zombie_jobs storage=LTO1-ANSI_6 client=$clientname
+
+touch ${cwd}/build/po/*.po
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out ${cwd}/tmp/log2.out  
+run storage=LTO1-ANSI_6 job=NightlySave3 pool=Inc  yes
+wait
+messages
+@# 
+@# now do a restore
+@#
+restore fileset="Full Set" pool=Diff where=${cwd}/tmp/bacula-restores select all done
+yes
+wait
+messages
+wait
+messages
+END_OF_DATA
+
+run_bconsole
 check_for_zombie_jobs storage=LTO1 client=$clientname
 check_for_zombie_jobs storage=LTO3 client=$clientname
-
+check_for_zombie_jobs storage=LTO1-ANSI_6 client=$clientname
 stop_bacula
 
-grep 'Error: Re-read' tmp/log3.out > /dev/null
+check_two_logs
+check_restore_diff
+
+grep LTO1_5 tmp/log1.out > /dev/null
+if test $? = 0; then
+    echo "AutoSelect option broken"
+    bstat=1
+fi
+
+grep 'Error: Re-read' tmp/log1.out > /dev/null
 if test $? = 0; then
     echo "Found Re-read errors"
     bstat=1