]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Add test for new keywords in list events command
authorEric Bollengier <eric@baculasystems.com>
Thu, 1 Apr 2021 11:50:16 +0000 (13:50 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:00 +0000 (09:03 +0100)
regress/tests/events-test

index ecdc28e3872e8b79ca3c8a06ad791fc87f0c552b..6be27f39c715b0f7e46dca469a861be0dc2613f0 100755 (executable)
@@ -70,6 +70,12 @@ cat <<END_OF_DATA >$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"