From: Remi Gacogne Date: Mon, 19 Jan 2026 11:35:11 +0000 (+0100) Subject: dnsdist: Don't use double negatives for the SL setting in our tests X-Git-Tag: rec-5.4.0-beta1~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75d696983e6dab31fa70cca35574ae8e0d42a810;p=thirdparty%2Fpdns.git dnsdist: Don't use double negatives for the SL setting in our tests Signed-off-by: Remi Gacogne --- diff --git a/regression-tests.dnsdist/dnsdisttests.py b/regression-tests.dnsdist/dnsdisttests.py index a53c58092d..3f3fa2eac1 100644 --- a/regression-tests.dnsdist/dnsdisttests.py +++ b/regression-tests.dnsdist/dnsdisttests.py @@ -105,7 +105,7 @@ class DNSDistTest(AssertEqualDNSMessageMixin, unittest.TestCase): _UDPResponder = None _TCPResponder = None _extraStartupSleep = 0 - _disableStructuredLoggingOnCL = False + _enableStructuredLoggingOnCL = True _dnsDistPort = pickAvailablePort() _consolePort = pickAvailablePort() _testServerPort = pickAvailablePort() @@ -184,9 +184,8 @@ class DNSDistTest(AssertEqualDNSMessageMixin, unittest.TestCase): if cls._verboseMode: dnsdistcmd.append('-v') - if cls._disableStructuredLoggingOnCL: - dnsdistcmd.append('--structured-logging') - dnsdistcmd.append('false') + dnsdistcmd.append('--structured-logging') + dnsdistcmd.append('true' if cls._enableStructuredLoggingOnCL else 'false') if cls._sudoMode: preserve_env_values = ['LD_LIBRARY_PATH', 'LLVM_PROFILE_FILE'] @@ -215,7 +214,7 @@ class DNSDistTest(AssertEqualDNSMessageMixin, unittest.TestCase): if not cls._verboseMode and output != expectedOutput: raise AssertionError('dnsdist --check-config failed: %s (expected %s)' % (output, expectedOutput)) elif not cls._verboseMode: - if not cls._disableStructuredLoggingOnCL: + if cls._enableStructuredLoggingOnCL: expectedPrefix = b'msg="Configuration OK" subsystem="setup" level="0" prio="Info" ts="' if not output.startswith(expectedPrefix): raise AssertionError('dnsdist --check-config failed: %s (expected prefix %s)' % (output, expectedPrefix)) diff --git a/regression-tests.dnsdist/test_Yaml.py b/regression-tests.dnsdist/test_Yaml.py index e98a084c96..7f31d04c54 100644 --- a/regression-tests.dnsdist/test_Yaml.py +++ b/regression-tests.dnsdist/test_Yaml.py @@ -558,7 +558,7 @@ query_rules: _config_params = [] # we need this because the error is triggered during the parsing of the YAML configuration, # too early for the logging for the logging configuration to have been applied - _disableStructuredLoggingOnCL = True + _enableStructuredLoggingOnCL = False def testFailToStart(self): """