]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix assertAlmostEqual call to compare absolute difference 12144/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 25 Oct 2022 14:15:07 +0000 (16:15 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 1 Nov 2022 07:45:52 +0000 (08:45 +0100)
(cherry picked from commit 67dd4251f758a695dab05e206a32199ccee6c214)
(cherry picked from commit 23064464fe298ac748470942de6e04a429be9a31)

Backport of #12054 and #12133

regression-tests.recursor-dnssec/test_LockedCache.py

index 4977f76a6260dd98fd0e160cea9a4bda7191ee64..64f316165ebc0162b52a499a79adccffacf8b2dd 100644 (file)
@@ -27,7 +27,7 @@ class testLockedCache(RecursorTest):
                 pieces = i.split(' ')
                 print(pieces)
                 if pieces[0] == 'mx1.secure.example.' and pieces[4] == 'A':
-                    return pieces[2]
+                    return int(pieces[2])
             raise AssertionError("Cache Line not found");
 
         except subprocess.CalledProcessError as e:
@@ -102,4 +102,4 @@ class testNotLockedCache(RecursorTest):
         self.assertRRsetInAnswer(res, expected2)
         self.assertMatchingRRSIGInAnswer(res, expected2)
         ttl2 = self.getCacheTTL()
-        self.assertAlmostEqual(ttl1, ttl2, 1)
+        self.assertAlmostEqual(ttl1, ttl2, delta=1)