_healthCheckName = 'a.root-servers.net.'
_healthCheckCounter = 0
_answerUnexpected = True
+ _checkConfigExpectedOutput = None
@classmethod
def startResponders(cls):
output = subprocess.check_output(testcmd, stderr=subprocess.STDOUT, close_fds=True)
except subprocess.CalledProcessError as exc:
raise AssertionError('dnsdist --check-config failed (%d): %s' % (exc.returncode, exc.output))
- expectedOutput = ('Configuration \'%s\' OK!\n' % (confFile)).encode()
+ if cls._checkConfigExpectedOutput is not None:
+ expectedOutput = cls._checkConfigExpectedOutput
+ else:
+ expectedOutput = ('Configuration \'%s\' OK!\n' % (confFile)).encode()
if output != expectedOutput:
raise AssertionError('dnsdist --check-config failed: %s' % output)
s1 = newServer{address="127.0.0.1:%s", weight=-1}
s2 = newServer{address="127.0.0.1:%s", weight=2147483648}
"""
+ _checkConfigExpectedOutput = b"""Error creating new server: downstream weight value must be greater than 0.
+Error creating new server: downstream weight value must be between 1 and 2147483647
+Configuration 'configs/dnsdist_TestRoutingBadWeightWRandom.conf' OK!
+"""
def testBadWeightWRandom(self):
"""