]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Add test for JobDefs-Job tag
authorEric Bollengier <eric@baculasystems.com>
Mon, 24 Oct 2022 09:13:19 +0000 (11:13 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:00 +0000 (13:57 +0200)
regress/tests/tag-test

index 087e7245bb26da3a4fff115c33eca033a18bd0e8..fa1ee0ba829e7cbaadf4595dd8478d31a3c556d7 100755 (executable)
@@ -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"