cat <<EOF > $tmp/bconcmds
@##############################################
@$out $fn-purge
+restart jobid=18
+wait
+message
list files jobid=18
purge files jobid=18 yes
list files jobid=18
estat=1
fi
+if ! grep 'No authorization. Job "Simple"' $fn-purge > /dev/null; then
+ print_debug "ERROR: Should find issue with restart in $fn-purge"
+ estat=1
+fi
+
nb=`grep uk.po $fn-purge | wc -l`
if [ $nb != 0 ]; then
print_debug "ERROR: Should not find uk.po file in $fn-purge"
cat <<EOF > $tmp/bconcmds
@##############################################
@$out $fn-after-purge
+restart jobid=18
+wait
+message
list files jobid=18
purge files jobid=18 yes
list files jobid=18
estat=1
fi
+if ! grep "Backup OK" $fn-after-purge > /dev/null; then
+ print_debug "ERROR: Should find restart job $fn-after-purge"
+ estat=1
+fi
stop_bacula
end_test