]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix test to not depend upon the order of the returned records. 16602/head
authorMiod Vallat <miod.vallat@powerdns.com>
Fri, 5 Dec 2025 15:37:18 +0000 (16:37 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Fri, 5 Dec 2025 15:37:18 +0000 (16:37 +0100)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
regression-tests.api/test_Zones.py

index 1df56f5352ea2676422eca6d6b049e355ee841e2..9d410b1988144105654eef604e1a20ee29a5f6dc 100644 (file)
@@ -1715,7 +1715,11 @@ $NAME$  1D  IN  SOA ns1.example.org. hostmaster.example.org. (
         self.assert_success(r)
         # verify the zone contents
         data1 = self.get_zone(name)
-        self.assertEqual(get_rrset(data1, 'a.'+name)['records'], [ a1, a3 ])
+        # note that we can't assume anything about the order of the records
+        records = get_rrset(data1, 'a.' + name, 'A')['records']
+        self.assertEqual(len(records), 2)
+        self.assertTrue(a1 in records)
+        self.assertTrue(a3 in records)
         # get_rrset above has removed the timestamps from data1, fetch the
         # zone again, since we want to ensure the following operations do
         # not change anything.