From: Eric Bollengier Date: Wed, 23 Feb 2022 17:49:24 +0000 (+0100) Subject: regress: Adapt regress for new metadata filters X-Git-Tag: Beta-15.0.0~640 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4423086bf1f8184e11556b76f771d9b01cf72182;p=thirdparty%2Fbacula.git regress: Adapt regress for new metadata filters --- diff --git a/regress/tests/metadata-test b/regress/tests/metadata-test index 9cea40f35..05df3f34e 100755 --- a/regress/tests/metadata-test +++ b/regress/tests/metadata-test @@ -126,6 +126,14 @@ wait messages @$out $tmp/log.23.out .jlist metadata type=email owner=xxxx tenant=xxxx +@$out $tmp/log.24.out +.jlist metadata type=attachment tenant=xxxx owner=xxxx contenttype=application/octet-stream +@$out $tmp/log.25.out +.jlist metadata type=attachment tenant=xxxx owner=xxxx contenttype=application/jpg +@$out $tmp/log.26.out +.jlist metadata type=attachment tenant=xxxx owner=xxxx isinline=0 +@$out $tmp/log.27.out +.jlist metadata type=attachment tenant=xxxx owner=xxxx isinline=1 quit END_OF_DATA @@ -421,7 +429,51 @@ $j = JSON::decode_json($l) ; exit (scalar(@{$j->{data}}) == 4);' if [ $? != 1 ]; then - print_debug "ERROR: Incorrect data in $tmp/log.21.out" + print_debug "ERROR: Incorrect data in $tmp/log.23.out" + estat=1 +fi + + # Should find 1 attachment, +grep '\[' $tmp/log.24.out | perl -MJSON -e ' +$l = <>; +$j = JSON::decode_json($l) ; +exit (scalar(@{$j->{data}}) == 2);' + +if [ $? != 1 ]; then + print_debug "ERROR: Incorrect data in $tmp/log.24.out" + estat=1 +fi + + # Should find 0 attachment, +grep '\[' $tmp/log.25.out | perl -MJSON -e ' +$l = <>; +$j = JSON::decode_json($l) ; +exit (scalar(@{$j->{data}}) == 0);' + +if [ $? != 1 ]; then + print_debug "ERROR: Incorrect data in $tmp/log.25.out" + estat=1 +fi + + # Should find 0 attachment, +grep '\[' $tmp/log.26.out | perl -MJSON -e ' +$l = <>; +$j = JSON::decode_json($l) ; +exit (scalar(@{$j->{data}}) == 2);' + +if [ $? != 1 ]; then + print_debug "ERROR: Incorrect data in $tmp/log.26.out" + estat=1 +fi + + # Should find 0 attachment, +grep '\[' $tmp/log.27.out | perl -MJSON -e ' +$l = <>; +$j = JSON::decode_json($l) ; +exit (scalar(@{$j->{data}}) == 0);' + +if [ $? != 1 ]; then + print_debug "ERROR: Incorrect data in $tmp/log.26.out" estat=1 fi