]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Move assertLocalSamDB() into RawKerberosTest
authorJo Sutton <josutton@catalyst.net.nz>
Thu, 15 Feb 2024 00:45:10 +0000 (13:45 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 27 Feb 2024 01:11:37 +0000 (01:11 +0000)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/lockout_tests.py
python/samba/tests/krb5/raw_testcase.py

index d91eb1df79d1f71690fc08c35d77b02ceeb207e7..584e95ba1993dc0e743546cc142db563cd5234a0 100755 (executable)
@@ -584,14 +584,6 @@ class LockoutTests(KDCBaseTest):
         # Set it temporarily to '0'.
         samdb.set_minPwdAge('0')
 
-    def assertLocalSamDB(self, samdb):
-        if samdb.url.startswith('tdb://'):
-            return
-        if samdb.url.startswith('mdb://'):
-            return
-
-        self.fail(f'connection to {samdb.url} is not local!')
-
     def wait_for_ready(self, pipe, future):
         if pipe.poll(timeout=5):
             return
index 90d286a66bec8394b1af2582c425dfe878348d9b..85daacf88ce02898986925c7332bd4aefc8be39b 100644 (file)
@@ -1374,6 +1374,14 @@ class RawKerberosTest(TestCase):
 
             self.assertCountEqual(expected, got, fail_msg)
 
+    def assertLocalSamDB(self, samdb):
+        if samdb.url.startswith('tdb://'):
+            return
+        if samdb.url.startswith('mdb://'):
+            return
+
+        self.fail(f'connection to {samdb.url} is not local!')
+
     def get_KerberosTimeWithUsec(self, epoch=None, offset=None):
         if epoch is None:
             epoch = time.time()