From: Remi Gacogne Date: Wed, 15 Mar 2023 10:01:46 +0000 (+0100) Subject: dnsdist: Update the backend discovery tests X-Git-Tag: dnsdist-1.8.0-rc3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe772400d3e97c6a7c417925fea0fe7ac2b0ae8f;p=thirdparty%2Fpdns.git dnsdist: Update the backend discovery tests The output of `showServers()` has been modified, and these tests parse it to know whether a backend has been correctly upgraded. --- diff --git a/regression-tests.dnsdist/test_BackendDiscovery.py b/regression-tests.dnsdist/test_BackendDiscovery.py index f8b1f14041..df54c74e38 100644 --- a/regression-tests.dnsdist/test_BackendDiscovery.py +++ b/regression-tests.dnsdist/test_BackendDiscovery.py @@ -356,7 +356,7 @@ class TestBackendDiscovery(DNSDistTest): if line.startswith('#') or line.startswith('All'): continue tokens = line.split() - self.assertTrue(len(tokens) == 12 or len(tokens) == 13) + self.assertTrue(len(tokens) == 13 or len(tokens) == 14) if tokens[1] == '127.0.0.1:10652': # in this particular case, the upgraded backend # does not replace the existing one and thus @@ -365,8 +365,8 @@ class TestBackendDiscovery(DNSDistTest): else: self.assertEquals(tokens[2], 'UP') pool = '' - if len(tokens) == 13: - pool = tokens[12] + if len(tokens) == 14: + pool = tokens[13] backends[tokens[1]] = pool expected = {