selftest: Rework samba.tests.getdcname not to use ncalrpc
authorAndrew Bartlett <abartlet@samba.org>
Thu, 25 May 2023 04:57:55 +0000 (16:57 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 29 May 2023 22:32:28 +0000 (22:32 +0000)
This test is able to operate over the network, which aids testing against
a comparative windows DC.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
python/samba/tests/getdcname.py
source4/selftest/tests.py

index fc6b6d9a6bd463caaa81d32b494feb690dd8aac7..34806f5e6625760ced641b574ecdf2fb4f01a943 100644 (file)
@@ -44,7 +44,7 @@ class GetDCNameEx(samba.tests.TestCase):
     def _call_get_dc_name(self, domain=None, domain_guid=None,
                           site_name=None, ex2=False, flags=0):
         if self.netlogon_conn is None:
-            self.netlogon_conn = netlogon.netlogon("ncalrpc:[schannel]",
+            self.netlogon_conn = netlogon.netlogon(f"ncacn_ip_tcp:{self.server}",
                                                    self.get_loadparm())
 
         if ex2:
index 93d161d89f197d7a7f37bfdd55a033afb3edd888..ef63c222a4f0ccfa23f40d8fc98748992464da1a 100755 (executable)
@@ -1323,7 +1323,7 @@ if have_heimdal_support:
     planoldpythontestsuite("ad_dc", "samba.tests.group_audit",
                            extra_args=['-U"$USERNAME%$PASSWORD"'])
 
-planoldpythontestsuite("fl2008r2dc:local",
+planoldpythontestsuite("fl2008r2dc",
                        "samba.tests.getdcname",
                        extra_args=['-U"$USERNAME%$PASSWORD"'])