]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Update the backend discovery tests for the updated health-check options
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 18 Oct 2022 15:38:59 +0000 (17:38 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 20 Oct 2022 12:31:04 +0000 (14:31 +0200)
regression-tests.dnsdist/test_BackendDiscovery.py

index b8ee41f4332985e7498547a0b61b313bcc49e551..f8b1f14041e72953fe94fdbb19afb30cc26a9c5a 100644 (file)
@@ -357,7 +357,13 @@ class TestBackendDiscovery(DNSDistTest):
                 continue
             tokens = line.split()
             self.assertTrue(len(tokens) == 12 or len(tokens) == 13)
-            self.assertEquals(tokens[2], 'UP')
+            if tokens[1] == '127.0.0.1:10652':
+                # in this particular case, the upgraded backend
+                # does not replace the existing one and thus
+                # the health-check is forced to auto (or lazy auto)
+                self.assertEquals(tokens[2], 'up')
+            else:
+                self.assertEquals(tokens[2], 'UP')
             pool = ''
             if len(tokens) == 13:
                 pool = tokens[12]