]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: tweak copy-job-mail-test
authorMichal Rakowski <michal.rakowski@baculasystems.com>
Thu, 5 Aug 2021 06:15:46 +0000 (08:15 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:03 +0000 (09:03 +0100)
regress/tests/copy-job-mail-test

index aefe0996f918519980808118c957a9b8b9efad83..d718f441721ae730ed166ad6c28e5fb26bc4a17b 100755 (executable)
@@ -24,7 +24,7 @@ change_jobname NightlySave $JobName
 cat <<END_OF_DATA >> $bin/bacula-dir.conf
 Messages {
   Name = CopyMsg
-  mailcommand = "${bin}/bsmtp job: %j old_id=%m mac_id=%i new_id=%I"
+  mailcommand = "${bin}/bsmtp job_header: %j old_id=%m mac_id=%i new_id=%I"
   mail = mrakow@localhost.com =  all
   console = all
 
@@ -58,9 +58,9 @@ run_bacula
 old_jobid=`cat ${cwd}/tmp/log2.out| grep 'Prev Backup JobId:' | cut -d':' -f 2 | tr -d ' '`
 mac_jobid=`cat ${cwd}/tmp/log2.out| grep 'Current JobId:' | cut -d':' -f 2 | tr -d ' '`
 new_jobid=`cat ${cwd}/tmp/log2.out| grep 'New Backup JobId:' | cut -d':' -f 2 | tr -d ' '`
-mail_old_jobid=`cat tmp/dummy_bsmtp.out | cut -d'=' -f2 | cut -d' ' -f1`
-mail_mac_jobid=`cat tmp/dummy_bsmtp.out | cut -d'=' -f3 | cut -d' ' -f1`
-mail_new_jobid=`cat tmp/dummy_bsmtp.out | cut -d'=' -f4 | cut -d' ' -f1`
+mail_old_jobid=`cat ${cwd}/tmp/dummy_bsmtp.out | grep job_header | cut -d'=' -f2 | cut -d' ' -f1`
+mail_mac_jobid=`cat ${cwd}/tmp/dummy_bsmtp.out | grep job_header | cut -d'=' -f3 | cut -d' ' -f1`
+mail_new_jobid=`cat ${cwd}/tmp/dummy_bsmtp.out | grep job_header | cut -d'=' -f4 | cut -d' ' -f1`
 
 if [ $old_jobid -ne $mail_old_jobid ]; then
    estat=1