From: Eric Bollengier Date: Thu, 1 Apr 2021 11:50:16 +0000 (+0200) Subject: regress: Add test for new keywords in list events command X-Git-Tag: Release-11.3.2~642 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4811922031d231c9f26b980046be79d3e3e253d1;p=thirdparty%2Fbacula.git regress: Add test for new keywords in list events command --- diff --git a/regress/tests/events-test b/regress/tests/events-test index ecdc28e38..6be27f39c 100755 --- a/regress/tests/events-test +++ b/regress/tests/events-test @@ -70,6 +70,12 @@ cat <$tmp/bconcmds status client @$out $tmp/log5.out list events +@$out $tmp/log6.out +llist events type=bweb +@$out $tmp/log7.out +llist events source=*Console* +@$out $tmp/log8.out +llist events code=DJ0001 quit END_OF_DATA @@ -77,6 +83,31 @@ run_bconsole stop_bacula +nb_total=`grep "code:" $tmp/log8.out | wc -l` +nb_found=`grep " DJ0001" $tmp/log8.out | wc -l` + +if [ $nb_found != $nb_total ]; then + print_debug "ERROR: Found unexpected codes in $tmp/log8.out ($nb_found/$nb_total)" + estat=1 +fi + +nb_total=`grep "source:" $tmp/log7.out | wc -l` +nb_found=`grep " \\*Console*" $tmp/log7.out | wc -l` + +if [ $nb_found != $nb_total ]; then + print_debug "ERROR: Found unexpected source in $tmp/log7.out ($nb_found/$nb_total)" + estat=1 +fi + +nb_total=`grep "type:" $tmp/log6.out | wc -l` +nb_found=`grep " bweb" $tmp/log6.out | wc -l` + +if [ $nb_found != $nb_total ]; then + print_debug "ERROR: Found unexpected type in $tmp/log6.out ($nb_found/$nb_total)" + estat=1 +fi + + grep "User login" $tmp/log2.out > /dev/null if [ $? != 0 ]; then print_debug "ERROR: should find bweb user login in $tmp/log2.out"