summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/tests/provision.py26
1 files changed, 1 insertions, 25 deletions
diff --git a/source4/scripting/python/samba/tests/provision.py b/source4/scripting/python/samba/tests/provision.py
index 7a259f71e3..f34073504c 100644
--- a/source4/scripting/python/samba/tests/provision.py
+++ b/source4/scripting/python/samba/tests/provision.py
@@ -18,7 +18,7 @@
#
import os
-from samba.provision import setup_secretsdb, secretsdb_become_dc, findnss
+from samba.provision import setup_secretsdb, findnss
import samba.tests
from ldb import Dn
from samba import param
@@ -44,30 +44,6 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
del ldb
os.unlink(path)
- def test_become_dc(self):
- path = os.path.join(self.tempdir, "secrets.ldb")
- secrets_ldb = setup_secretsdb(path, setup_path, None, None, lp=lp)
- try:
- secretsdb_become_dc(secrets_ldb, setup_path, domain="EXAMPLE",
- realm="example", netbiosname="myhost",
- domainsid="S-5-22", keytab_path="keytab.path",
- samdb_url="ldap://url/",
- dns_keytab_path="dns.keytab", dnspass="bla",
- machinepass="machinepass", dnsdomain="example.com")
- self.assertEquals(0,
- len(secrets_ldb.search("samAccountName=krbtgt,flatname=EXAMPLE,CN=Principals")))
- self.assertEquals("keytab.path",
- secrets_ldb.searchone(basedn="flatname=EXAMPLE,CN=primary domains",
- expression="(privateKeytab=*)",
- attribute="privateKeytab"))
- self.assertEquals("S-5-22",
- secrets_ldb.searchone(basedn="flatname=EXAMPLE,CN=primary domains",
- expression="objectSid=*", attribute="objectSid"))
-
- finally:
- del secrets_ldb
- os.unlink(path)
-
class FindNssTests(unittest.TestCase):
"""Test findnss() function."""