run_bconsole
-check_for_zombie_jobs storage=LTO3
-stop_bacula
-
-cp tmp/log2.out tmp/log1.out
-check_two_logs
-
-
awk '/Must choose/ { print $4 } ' tmp/log2.out > tmp/normal
awk '/Volume name.+:/ { print $3 } ' tmp/log2.out > tmp/real
diff tmp/normal tmp/real > /dev/null
# in this situation, we have 1 available volume (vol50) and bacula will try to use
# vol47, vol48 and vol49 and will stop without using vol50.
+
cat <<EOF > ${cwd}/tmp/bconcmds
-@$out ${cwd}/tmp/log2.out
+@$out ${cwd}/tmp/log1.out
update volume=vol47 pool=Test VolStatus=Used VolRetention=10s inchanger=no RecyclePool=Test
update volume=vol48 pool=Test VolStatus=Used VolRetention=10s inchanger=no RecyclePool=Test
update volume=vol49 pool=Test VolStatus=Used VolRetention=10s inchanger=no RecyclePool=Test
list volume
run level=full pool=Test NightlySave yes
wait
+messages
+quit
EOF
+run_bconsole
+
+check_for_zombie_jobs storage=LTO3
+stop_bacula
+
+grep "Invalid slot=0 defined in catalog for Volume" tmp/log1.out > /dev/null
+if [ $? -ne 0 ]; then
+ bstat=$?
+fi
+
+check_two_logs
+
end_test