From: Jo Sutton Date: Thu, 15 Feb 2024 00:45:10 +0000 (+1300) Subject: tests/krb5: Move assertLocalSamDB() into RawKerberosTest X-Git-Tag: tdb-1.4.11~1681 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e342e2d37aed612cab59f543dddd3870f5208a6;p=thirdparty%2Fsamba.git tests/krb5: Move assertLocalSamDB() into RawKerberosTest Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/krb5/lockout_tests.py b/python/samba/tests/krb5/lockout_tests.py index d91eb1df79d..584e95ba199 100755 --- a/python/samba/tests/krb5/lockout_tests.py +++ b/python/samba/tests/krb5/lockout_tests.py @@ -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 diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py index 90d286a66be..85daacf88ce 100644 --- a/python/samba/tests/krb5/raw_testcase.py +++ b/python/samba/tests/krb5/raw_testcase.py @@ -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()