1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-22 16:59:09 +03:00

s4-test: Use smb.conf path set in environment rather than using

command-line options.

This is the first step towards supporting custom test runners.
This commit is contained in:
Jelmer Vernooij
2010-06-13 16:38:24 +02:00
parent 46037a8160
commit 51058213cb
9 changed files with 47 additions and 43 deletions

View File

@ -20,10 +20,9 @@
import os
from samba.provision import setup_secretsdb, findnss
import samba.tests
from samba.tests import env_loadparm
import unittest
lp = samba.tests.cmdline_loadparm
setup_dir = "setup"
def setup_path(file):
return os.path.join(setup_dir, file)
@ -34,7 +33,7 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
"""
def test_setup_secretsdb(self):
path = os.path.join(self.tempdir, "secrets.ldb")
ldb = setup_secretsdb(path, setup_path, None, None, lp=lp)
ldb = setup_secretsdb(path, setup_path, None, None, lp=env_loadparm())
try:
self.assertEquals("LSA Secrets",
ldb.searchone(basedn="CN=LSA Secrets", attribute="CN"))