From: Remi Gacogne Date: Tue, 23 Oct 2018 11:49:15 +0000 (+0200) Subject: dnsdist: Nodes in NMG are now ordered, fix the API regression tests X-Git-Tag: dnsdist-1.3.3~33^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7095%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Nodes in NMG are now ordered, fix the API regression tests --- diff --git a/regression-tests.dnsdist/test_API.py b/regression-tests.dnsdist/test_API.py index 5d0483e10d..f3047581c4 100644 --- a/regression-tests.dnsdist/test_API.py +++ b/regression-tests.dnsdist/test_API.py @@ -178,7 +178,11 @@ class TestAPIBasics(DNSDistTest): self.assertEquals(content['name'], 'allow-from') self.assertEquals(content['type'], 'ConfigSetting') - self.assertEquals(content['value'], ["127.0.0.1/32", "::1/128"]) + acl = content['value'] + expectedACL = ["127.0.0.1/32", "::1/128"] + acl.sort() + expectedACL.sort() + self.assertEquals(acl, expectedACL) def testServersLocalhostConfigAllowFromPut(self): """ @@ -333,7 +337,11 @@ class TestAPIWritable(DNSDistTest): self.assertEquals(r.status_code, 200) self.assertTrue(r.json()) content = r.json() - self.assertEquals(content['value'], ["127.0.0.1/32", "::1/128"]) + acl = content['value'] + expectedACL = ["127.0.0.1/32", "::1/128"] + acl.sort() + expectedACL.sort() + self.assertEquals(acl, expectedACL) newACL = ["192.0.2.0/24", "198.51.100.0/24", "203.0.113.0/24"] payload = json.dumps({"name": "allow-from",