From e94bfe5efbbc61eea8592adce55a998aa6f400d8 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 30 Oct 2009 14:51:57 +1100 Subject: s4:provision Fix samdb test with new provision code --- source4/scripting/python/samba/tests/samdb.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source4/scripting/python/samba/tests/samdb.py b/source4/scripting/python/samba/tests/samdb.py index d56f75b314..db57ca64a2 100644 --- a/source4/scripting/python/samba/tests/samdb.py +++ b/source4/scripting/python/samba/tests/samdb.py @@ -47,8 +47,6 @@ class SamDBTestCase(TestCaseInTempDir): schemadn = "CN=Schema," + configdn domainguid = str(uuid.uuid4()) policyguid = str(uuid.uuid4()) - creds = Credentials() - creds.set_anonymous() domainsid = security.random_sid() hostguid = str(uuid.uuid4()) path = os.path.join(self.tempdir, "samdb.ldb") @@ -71,7 +69,18 @@ class SamDBTestCase(TestCaseInTempDir): serverrole=serverrole, domaindn=self.domaindn, configdn=configdn, schemadn=schemadn) - self.samdb = setup_samdb(path, self.setup_path, session_info, creds, + + paths = provision_paths_from_lp(self.lp, names.dnsdomain) + + provision_backend = ProvisionBackend("ldb", backend_type, + paths=paths, setup_path=self.setup_path, + lp=self.lp, credentials=None, + names=names, + message=message, hostname=hostname, + root=root, schema=schema, + domainsid=domainsid) + + self.samdb = setup_samdb(path, self.setup_path, session_info, provision_backend, self.lp, names, lambda x: None, domainsid, domainguid, -- cgit