From: Eric Bollengier Date: Mon, 24 Oct 2022 09:13:19 +0000 (+0200) Subject: regress: Add test for JobDefs-Job tag X-Git-Tag: Beta-15.0.0~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc0be411b644359d44ee51e384c06853e9ef453c;p=thirdparty%2Fbacula.git regress: Add test for JobDefs-Job tag --- diff --git a/regress/tests/tag-test b/regress/tests/tag-test index 087e7245b..fa1ee0ba8 100755 --- a/regress/tests/tag-test +++ b/regress/tests/tag-test @@ -27,6 +27,9 @@ $bperl -e "extract_resource('$conf/bacula-dir.conf', 'Client', '$HOST-fd')" \ $bperl -e "add_attribute('$conf/bacula-dir.conf', 'Tag', '\"#byresource\"', 'Job', 'MonsterSave')" +$bperl -e "add_attribute('$conf/bacula-dir.conf', 'Tag', '\"#byjobdef\"', 'JobDefs', 'BackupJob')" +$bperl -e "add_attribute('$conf/bacula-dir.conf', 'JobDefs', 'BackupJob', 'Job', 'Simple')" + sed "s/$HOST-fd/test1-fd/" $tmp/1 >> $conf/bacula-dir.conf sed "s/$HOST-fd/test2-fd/" $tmp/1 >> $conf/bacula-dir.conf sed "s/$HOST-fd/test-rst-fd/" $tmp/1 >> $conf/bacula-dir.conf @@ -486,6 +489,12 @@ if [ $nb != 6 ]; then estat=1 fi +nb=`grep "#byjobdef" $tmp/tag.50.job | wc -l` +if [ $nb != 2 ]; then + print_debug "ERROR: Should find 1 #byjobdef tag into $tmp/tag.50.job" + estat=1 +fi + nb=`grep "#tagviamenu" $tmp/tag.50.job | wc -l` if [ $nb != 4 ]; then print_debug "ERROR: Should find 2 #tagviamenu tag into $tmp/tag.50.job"