Skip to content

Commit

Permalink
dnsdist: Update the backend discovery tests
Browse files Browse the repository at this point in the history
The output of `showServers()` has been modified, and these tests
parse it to know whether a backend has been correctly upgraded.
  • Loading branch information
rgacogne committed Mar 15, 2023
1 parent cbd1725 commit fe77240
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions regression-tests.dnsdist/test_BackendDiscovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def checkBackendsUpgraded(self):
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
Expand All @@ -365,8 +365,8 @@ def checkBackendsUpgraded(self):
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 = {
Expand Down

0 comments on commit fe77240

Please sign in to comment.