]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/restart-accurate-job-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / restart-accurate-job-test
index 37e6d82f8fa06238f1b23b66adfdcfc67835eed3..a5ad839bc8a1668a641b47bf7450720d2645a93e 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
 #
 # Run a backup of the build directory but force it to have
 #   a comm error, and check that it restarts correctly.
@@ -9,15 +14,18 @@ JobName=RestartJob
 
 scripts/cleanup
 scripts/copy-test-confs
+
+
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
 
 $bperl -e "add_attribute('$conf/bacula-dir.conf', 'Accurate', 'yes', 'Job', 'RestartJob')"
 start_test
+touch $cwd/build/po/testfile
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
 messages
 @$out ${cwd}/tmp/log1.out
 label storage=File volume=TestVolume001
@@ -26,6 +34,9 @@ setdebug level=0 trace=0 hangup=100 client
 run job=$JobName yes
 wait
 messages
+sql
+select * from JobMedia;
+
 quit
 END_OF_DATA
 
@@ -34,14 +45,18 @@ run_bacula
 scripts/check_for_zombie_jobs storage=File
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
 @$out ${cwd}/tmp/log1.out
 setdebug level=0 trace=0 hangup=50 client
 @exec "sh -c 'touch $cwd/build/po/*'"
 @exec "sh -c 'touch $cwd/build/src/dird/*'"
+@exec "rm $cwd/build/po/testfile"
 run job=$JobName yes
 wait
 messages
+sql
+select * from JobMedia;
+
 @# 
 @# now do a restore
 @#