From: Eric Bollengier Date: Tue, 9 Mar 2021 16:30:52 +0000 (+0100) Subject: regress: Add test for very long directive X-Git-Tag: Release-11.0.2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75f8d37d73e86fdd3910f69c72497200a8ebf180;p=thirdparty%2Fbacula.git regress: Add test for very long directive --- diff --git a/regress/tests/json-test b/regress/tests/json-test index 61b54a85a..909860e68 100755 --- a/regress/tests/json-test +++ b/regress/tests/json-test @@ -25,6 +25,11 @@ Messages { } EOF +VAR=START +for i in $(seq 1 1000); do VAR=$VAR,www$i.superdomain.org ; done + +$bperl -e 'add_attribute("$conf/bacula-sd.conf", "TlsAllowedCn", "'$VAR',END", "Storage")' + cat $tmp/1 >> $conf/bacula-dir.conf cat $tmp/1 >> $conf/bacula-sd.conf cat $tmp/1 >> $conf/bacula-fd.conf @@ -36,4 +41,12 @@ if [ $? -ne 0 ]; then print_debug "ERROR: Issue while checking json output" estat=1 fi + +min=`echo $VAR | wc -c` +nb=`$bin/bsdjson -r Storage -l Tls | wc -c` +if [ $nb -lt $min ]; then + print_debug "ERROR: long directive was truncated" + estat=1 +fi + end_test