]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Fix metadata-test
authorEric Bollengier <eric@baculasystems.com>
Fri, 28 Jan 2022 14:56:49 +0000 (15:56 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:57 +0000 (13:56 +0200)
regress/tests/metadata-test

index 73e8c58fd21991659dbf615d69b2d5f9fe96a8cf..6257c132bab585d3eb1af03333b616f037ae2fe6 100755 (executable)
@@ -224,7 +224,7 @@ exit (scalar(@{$j->{data}}) == 1);'
     grep '{' $tmp/log_$mode.8.out | perl -MJSON -e '
 $l = <>;
 $j = JSON::decode_json($l) ;
-exit (scalar(@{$j->{data}}) == 2 && $j->[0]->{emailtime} eq "2021-09-15 12:39:19");'
+exit (scalar(@{$j->{data}}) == 2 && $j->{data}->[0]->{emailtime} eq "2021-09-15 12:39:19");'
 
     if [ $? != 1 ]; then
         print_debug "ERROR: Incorrect data in $tmp/log_$mode.8.out"
@@ -235,7 +235,7 @@ exit (scalar(@{$j->{data}}) == 2 && $j->[0]->{emailtime} eq "2021-09-15 12:39:19
     grep '{' $tmp/log_$mode.9.out | perl -MJSON -e '
 $l = <>;
 $j = JSON::decode_json($l) ;
-exit (scalar(@{$j->{data}}) == 2 && $j->[0]->{emailtime} eq "2021-09-15 12:40:19");'
+exit (scalar(@{$j->{data}}) == 2 && $j->{data}->[0]->{emailtime} eq "2021-09-15 12:40:19");'
 
     if [ $? != 1 ]; then
         print_debug "ERROR: Incorrect data in $tmp/log_$mode.9.out"
@@ -279,7 +279,7 @@ exit (scalar(@{$j->{data}}) == 1);'
     grep '{' $tmp/log_$mode.13.out | perl -MJSON -e '
 $l = <>; 
 $j = JSON::decode_json($l) ;
-exit (scalar(@{$j->{data}}) == 2 && $j->[0]->{emailsize} < 100000);'
+exit (scalar(@{$j->{data}}) == 2 && $j->{data}->[0]->{emailsize} < 100000);'
 
     if [ $? != 1 ]; then
         print_debug "ERROR: Incorrect data in $tmp/log_$mode.13.out"