]> granicus.if.org Git - pdns/commitdiff
Skip subtree option tests against auth
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Wed, 2 May 2018 13:55:34 +0000 (15:55 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 16 May 2018 09:30:51 +0000 (11:30 +0200)
(cherry picked from commit 921442337d81d1e9a4fa0e1f70f140e1f3ccf472)

regression-tests.api/test_Cache.py

index 3ab4ea68c6891782b4d8169bc4f485f09738c6a1..d8ffc1596164893262697306cf5543676c8e864c 100644 (file)
@@ -1,4 +1,5 @@
 from test_helper import ApiTestCase, is_auth, is_recursor, sdig
+import unittest
 
 
 class Servers(ApiTestCase):
@@ -9,6 +10,7 @@ class Servers(ApiTestCase):
         data = r.json()
         self.assertIn('count', data)
 
+    @unittest.skipIf(not is_recursor(), "Not applicable")
     def test_flush_count(self):
         sdig("ns1.example.com", 'A')
         r = self.session.put(self.url("/api/v1/servers/localhost/cache/flush?domain=ns1.example.com."))
@@ -17,6 +19,7 @@ class Servers(ApiTestCase):
         self.assertIn('count', data)
         self.assertEquals(1, data['count'])
 
+    @unittest.skipIf(not is_recursor(), "Not applicable")
     def test_flush_subtree(self):
         sdig("ns1.example.com", 'A')
         sdig("ns2.example.com", 'A')