From: Eric Bollengier Date: Tue, 31 Jan 2023 09:23:57 +0000 (+0100) Subject: regress: Add test for list reviewed command X-Git-Tag: Beta-15.0.0~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50159c8e5d54f0e0271941541d08e24159563330;p=thirdparty%2Fbacula.git regress: Add test for list reviewed command --- diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test index d5720770b..98bbe3939 100755 --- a/regress/tests/backup-bacula-test +++ b/regress/tests/backup-bacula-test @@ -70,6 +70,12 @@ restore where=$tmp/bacula-restores select all done yes wait messages +@output $tmp/log31.out +.jlist jobs reviewed=1 +@output $tmp/log32.out +update jobid=1 reviewed=1 +@output $tmp/log33.out +.jlist jobs reviewed=1 quit END_OF_DATA @@ -84,6 +90,18 @@ run_bacula check_for_zombie_jobs storage=File1 stop_bacula +grep '{' $tmp/log31.out | perl -MJSON -e '$l = <>; $obj = JSON::decode_json($l); exit (scalar(@{ $obj->{data} }) == 0);' +if [ $? != 1 ]; then + print_debug "ERROR: Should find 0 job reviewed in $tmp/log/31.out" + estat=1 +fi + +grep '{' $tmp/log33.out | perl -MJSON -e '$l = <>; $obj = JSON::decode_json($l); exit (scalar(@{ $obj->{data} }) == 1);' +if [ $? != 1 ]; then + print_debug "ERROR: Should find 1 job reviewed in $tmp/log33.out" + estat=1 +fi + check_two_logs check_restore_diff end_test