From: Eric Bollengier Date: Thu, 31 Aug 2023 08:32:28 +0000 (+0200) Subject: regress: pass comment on migration/copy jobs X-Git-Tag: Beta-15.0.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7f3ad658fa17f5a80da8cc84812ab131ef3a523;p=thirdparty%2Fbacula.git regress: pass comment on migration/copy jobs --- diff --git a/regress/tests/copy-job-test b/regress/tests/copy-job-test index 7296349fd..678fc1ee4 100755 --- a/regress/tests/copy-job-test +++ b/regress/tests/copy-job-test @@ -116,7 +116,7 @@ list volumes @#setdebug level=51 storage=DiskChanger @#setdebug level=100 storage=File tags=dedup,asx,network options=h dedup rehydra_check_hash=1 -run job=copy-job $run_spooldata yes +run job=copy-job $run_spooldata comment="from control job" yes wait messages @#purge volume=FileVolume001 @@ -152,6 +152,8 @@ yes list volumes wait messages +@$out $tmp/log4.out +.jlist jobid=6 quit END_OF_DATA @@ -168,4 +170,11 @@ if [ $? != 0 ]; then print_debug "The incremental job must use copied jobs" fi +grep '{' $tmp/log4.out | perl -MJSON -e '$j = decode_json(<>); exit ($j->{data}->[0]->{comment} eq "from control job" && $j->{data}->[0]->{controljobid} == 5);' + +if [ $? = 0 ]; then + print_debug "Incorrect comment or controljobid SQL field" + estat=1 +fi + end_test