diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-30 07:50:22 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-30 07:50:22 +1000 |
commit | 931d3d8fc5d9aa8ccb16018179fafa35968bb967 (patch) | |
tree | 121c10424b2307def6d900ee44c21d89354f5b28 /source4 | |
parent | 6ef9674caa67c1f086285f1bee17c6f390778588 (diff) | |
parent | 6f7b2b69333230016a9538b024faec0d97095c69 (diff) | |
download | samba-931d3d8fc5d9aa8ccb16018179fafa35968bb967.tar.gz samba-931d3d8fc5d9aa8ccb16018179fafa35968bb967.tar.bz2 samba-931d3d8fc5d9aa8ccb16018179fafa35968bb967.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit d335fd11637f5e138b08a5e0fcf54b19cef9a646)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/replace/libreplace_ld.m4 | 2 | ||||
-rw-r--r-- | source4/samba4-skip | 1 | ||||
-rw-r--r-- | source4/scripting/python/samba/tests/__init__.py | 1 | ||||
-rw-r--r-- | source4/scripting/python/samba/tests/samdb.py | 35 | ||||
-rwxr-xr-x | source4/selftest/samba4_tests.sh | 2 |
5 files changed, 27 insertions, 14 deletions
diff --git a/source4/lib/replace/libreplace_ld.m4 b/source4/lib/replace/libreplace_ld.m4 index 9995d69bbc..81bde46219 100644 --- a/source4/lib/replace/libreplace_ld.m4 +++ b/source4/lib/replace/libreplace_ld.m4 @@ -271,7 +271,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG], LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup" ;; *aix*) - LD_SHLIB_ALLOW_UNDEF_FLAG="--Wl,-bnoentry" + LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-bnoentry" ;; esac diff --git a/source4/samba4-skip b/source4/samba4-skip index 4ac35a3c78..de572ed41e 100644 --- a/source4/samba4-skip +++ b/source4/samba4-skip @@ -49,6 +49,5 @@ samba4.ntvfs.cifs.raw. ^samba4.net.api.become.dc.*$ # Fails nss.test # Fails samba4.samba3sam.python # Conversion from EJS not yet finished -samba4.samdb.python # Not finished yet raw.offline # Samba 4 doesn't have much offline support yet winreg* #Does not authenticate against the target server diff --git a/source4/scripting/python/samba/tests/__init__.py b/source4/scripting/python/samba/tests/__init__.py index e29b4a87d5..d827bfa004 100644 --- a/source4/scripting/python/samba/tests/__init__.py +++ b/source4/scripting/python/samba/tests/__init__.py @@ -47,6 +47,7 @@ class TestCaseInTempDir(unittest.TestCase): def tearDown(self): super(TestCaseInTempDir, self).tearDown() + self.assertEquals([], os.listdir(self.tempdir)) os.rmdir(self.tempdir) diff --git a/source4/scripting/python/samba/tests/samdb.py b/source4/scripting/python/samba/tests/samdb.py index 0d4f7bde0e..7e8ba053d4 100644 --- a/source4/scripting/python/samba/tests/samdb.py +++ b/source4/scripting/python/samba/tests/samdb.py @@ -16,13 +16,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -from auth import system_session -from credentials import Credentials +from samba.auth import system_session +from samba.credentials import Credentials import os -from samba.provision import setup_samdb +from samba.provision import setup_samdb, guess_names, setup_templatesdb from samba.samdb import SamDB from samba.tests import cmdline_loadparm, TestCaseInTempDir -import security +from samba import security from unittest import TestCase import uuid @@ -42,14 +42,27 @@ class SamDBTestCase(TestCaseInTempDir): domainsid = security.random_sid() hostguid = str(uuid.uuid4()) path = os.path.join(self.tempdir, "samdb.ldb") - self.samdb = setup_samdb(path, setup_path, system_session(), creds, - cmdline_loadparm, schemadn, configdn, - self.domaindn, "example.com", "EXAMPLE.COM", - "FOO", lambda x: None, "foo", domaindn, - False, domainsid, "# no aci", domainguid, - policyguid, "EXAMPLE", True, "secret", - "secret", "secret", hostguid, invocationid, + session_info = system_session() + names = guess_names(lp=cmdline_loadparm, hostname="foo", + domain="EXAMPLE.COM", dnsdomain="example.com", + serverrole="domain controller", + domaindn=self.domaindn, configdn=configdn, + schemadn=schemadn) + setup_templatesdb(os.path.join(self.tempdir, "templates.ldb"), + setup_path, session_info=session_info, + credentials=creds, lp=cmdline_loadparm) + self.samdb = setup_samdb(path, setup_path, session_info, creds, + cmdline_loadparm, names, + lambda x: None, domainsid, + "# no aci", domainguid, + policyguid, False, "secret", + "secret", "secret", invocationid, "secret", "domain controller") + def tearDown(self): + for f in ['templates.ldb', 'schema.ldb', 'configuration.ldb', + 'users.ldb', 'samdb.ldb']: + os.remove(os.path.join(self.tempdir, f)) + super(SamDBTestCase, self).tearDown() def test_add_foreign(self): self.samdb.add_foreign(self.domaindn, "S-1-5-7", "Somedescription") diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh index 1771a0da5c..9693451c47 100755 --- a/source4/selftest/samba4_tests.sh +++ b/source4/selftest/samba4_tests.sh @@ -340,8 +340,8 @@ plantest "provision.python" none $SUBUNITRUN samba.tests.provision plantest "samba3.python" none $SUBUNITRUN samba.tests.samba3 plantest "samr.python" dc $SUBUNITRUN samba.tests.dcerpc.sam plantest "dcerpc.bare.python" dc $SUBUNITRUN samba.tests.dcerpc.bare -plantest "samdb.python" dc $SUBUNITRUN samba.tests.samdb plantest "unixinfo.python" dc $SUBUNITRUN samba.tests.dcerpc.unix +plantest "samdb.python" none $SUBUNITRUN samba.tests.samdb plantest "events.python" none PYTHONPATH="$PYTHONPATH:lib/events" $SUBUNITRUN tests plantest "messaging.python" none PYTHONPATH="$PYTHONPATH:lib/messaging/tests" $SUBUNITRUN bindings plantest "samba3sam.python" none PYTHONPATH="$PYTHONPATH:dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam |