]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Move assignments closer to where the variables are used
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 18 Oct 2023 01:15:27 +0000 (14:15 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 19 Oct 2023 21:37:36 +0000 (21:37 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/conditional_ace_tests.py

index d3caa1b030004c76a52c6ba41729a3809539644c..e294fbd41d9527c782bac40246e4aeef79a3c6a1 100755 (executable)
@@ -2741,9 +2741,6 @@ class ConditionalAceTests(ConditionalAceBaseTests):
         except TypeError:
             self.assertIsNot(code, CRASHES_WINDOWS)
 
-        samdb = self.get_samdb()
-        domain_sid_str = samdb.get_domain_sid()
-
         client_creds = self.get_cached_creds(
             account_type=self.AccountType.USER,
             opts={
@@ -2824,6 +2821,9 @@ class ConditionalAceTests(ConditionalAceBaseTests):
             target_creds)
         target_etypes = target_creds.tgs_supported_enctypes
 
+        samdb = self.get_samdb()
+        domain_sid_str = samdb.get_domain_sid()
+
         expected_groups = self.map_sids(expected_groups, None, domain_sid_str)
         expected_device_groups = self.map_sids(expected_device_groups, None, domain_sid_str)