From d7f3ad658fa17f5a80da8cc84812ab131ef3a523 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 31 Aug 2023 10:32:28 +0200 Subject: [PATCH] regress: pass comment on migration/copy jobs --- regress/tests/copy-job-test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.47.3