1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

83 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
3d94b28441 s4:ldap.py - give the "primaryGroupToken" test a better name
It tests also some other constructed attributes in a basic way.
2010-03-04 18:16:24 +01:00
Matthias Dieter Wallnöfer
4546b6b7df s4:ldap.py - add test for "tokenGroups" 2010-03-04 18:16:24 +01:00
Jelmer Vernooij
aa1fce645a ldap: Fix test failure that seemed to go unreported previously. 2010-01-17 12:35:26 +13:00
Jelmer Vernooij
a18889fd77 ldap.py: Remove unused imports. 2010-01-17 12:26:53 +13:00
Jelmer Vernooij
28577aae92 Import testtools as well, required for subunit. 2010-01-16 19:53:49 +13:00
Andrew Tridgell
1c5a268f34 s4-ldaptest: need to use MessageElement for modify messages
Without MessageElement() the flags are not set, which is invalid
2010-01-02 08:16:56 +11:00
Andrew Tridgell
98d94cca6f s4-ldbtest: fixed message element in modify
a flags value of zero is not valid
2010-01-02 08:16:55 +11:00
Jelmer Vernooij
ea5af6e30c pyldb: Add dom_sid.split in favor of less powerful dom_sid_to_rid().
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:30 +11:00
Kamen Mazdrashki
c113be8526 s4-tort: Move Schema tests from ldap.py into separate module
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:44:05 +11:00
Brendan Powers
7cb858e151 s4-dsdb: Add a test for adding, deleting, and appending a posixAccount objectClass to a user
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-18 14:27:44 +11:00
Andrew Bartlett
b2db28b634 s4:ldap.py Improve testsuite for primaryGroupToken behaviour
This tries to show that the domain object should not have a
primaryGroupToken, for example.  (This passes against the old and new
code, as the failure case requires an object with an objectSid, and
exactly one group in it's subtree.  Sadly I don't know of a valid structure
that I can construct to test this).

Andrew Bartlett
2009-12-07 13:08:06 +11:00
Andrew Bartlett
f65360840a s4:ldap.py Add test of namingContext behaviour after tridge found a bug
Tridge found that the partitions.c module was being initialised twice,
and setting the partitions into the rootDSE twice.

Andrew Bartlett
2009-12-01 12:17:00 +11:00
Fernando J V da Silva
7399c04fd0 s4-drs: Test situations for runtime constructed parentGUID
Includes the following verifications for the constructed parentGUID:
- Checks if it returns nothing when there is no parent object
- Ensures that attributes mentioned after the parentGUID
are returned correctly (this avoid a bug pointed out by Tridge
during sync constructed parentGUID development)

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 21:17:28 +11:00
Andrew Tridgell
d5387edb88 s4-ldb: improve detection of whether the server has a GC port
We were trying to open $SERVER:3268 regardless, which could result in
creating a file called "localdc1:3268", which led to subsequent test
failures
2009-11-27 16:05:06 +11:00
Matthias Dieter Wallnöfer
97553373d1 s4:ldap.py - add a test for the enhanced operational attributes check
(Deny creation of entries with operational attributes specified)
2009-11-26 11:21:02 +01:00
Matthias Dieter Wallnöfer
4825df8323 s4:ldap.py - fix the schema update test on Windows Server
Apparently Windows Server (2003) doesn't like the comma delimiter here. I got
always error 16 ("LDB_NO_SUCH_ATTRIBUTE"). With this change the test works
again.
2009-11-24 19:44:18 +01:00
Matthias Dieter Wallnöfer
9aeaf31cfe s4:ldap.py - activate test for operational attributes
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-24 10:41:36 +11:00
Andrew Bartlett
cec473e728 s4:ldap.py Add tests for subSchemaSubEntry 2009-11-24 10:39:10 +11:00
Matthias Dieter Wallnöfer
81c46686db s4:ldap.py - Add a check for the generated "schemaIDGUID"
I've forgotten to add this when checking in the reworked SAMLDB module
2009-11-23 16:21:10 +01:00
Andrew Tridgell
47923ea507 s4-ldb: added a double-rename test
This tests the fix for double rename/add and indexing
2009-11-20 12:23:46 +11:00
Andrew Tridgell
2e46df492c s4-ldb: allow ldap.py test suite to run directly against a file
This makes it much easier to debug (as you can break in the ldb
modules by running gdb on /usr/bin/python)
2009-11-20 11:34:38 +11:00
Matthias Dieter Wallnöfer
6cf43db7fc s4:ldap.py - enhance schema addition test
Don't add only a new objectclass but also a new attribute. Plus let now the
server itself calculate the "lDAPDisplayName" attribute and compare the result.
2009-11-15 14:26:41 +01:00
Matthias Dieter Wallnöfer
8e320aea71 s4:ldap.py - Deactivates some at the moment pointless test parts
I think those parts should be deactivated since they're result set checks for
lookups which are commented out already.
2009-11-15 10:38:30 +01:00
Andrew Bartlett
d6d0c23d49 s4:ldb Add Well Known GUID (WKGUID) tests to ldap.py 2009-11-12 16:34:06 +11:00
Andrew Tridgell
932cda330a s4-samdb: remove the rDN size constraint of 64
This size constraint is not correct in it's current form, as windows
does send us rDN values for CN with lengths longer than 64. Once we
know how this constraint really works we can add it back in.
2009-11-09 22:19:52 +11:00
Andrew Tridgell
387e67d53f s4-ldaptest: "testgroup" is a bit too common
This failed on one of my test boxes that has a group called
"testgroup". using "testgroupXX" should be a bit better.
2009-10-15 20:02:59 +11:00
Andrew Tridgell
818d98acf1 s4-ldap: test the rDN size limit 2009-10-15 15:54:40 +11:00
Matthias Dieter Wallnöfer
30faff7567 s4:ldap.py - Further enhancements
- Enhance test for "distinguishedName"
- Add a test for single-valued attributes
- Add a test for multi-valued attributes
- Add a test for empty messages
- Add a test for empty attributes
2009-10-08 00:18:07 +02:00
Matthias Dieter Wallnöfer
6a4efccb38 s4:ldap.py - commented out the UTF8 tests (and fixed some deletion DNs) 2009-10-03 16:54:19 +02:00
Matthias Dieter Wallnöfer
be938ab44b s4:ldap.py - add tests for valid parent and RDN 2009-10-03 12:48:51 +02:00
Matthias Dieter Wallnöfer
2904f3378d s4:ldap.py - add a test for the "systemOnly" classes 2009-10-03 10:57:14 +02:00
Matthias Dieter Wallnöfer
e218a529e0 s4:ldap.py - add a very special rename test (with invalid - empty RDN) 2009-10-02 21:27:46 +02:00
Matthias Dieter Wallnöfer
a076d9fb59 s4:ldap.py - major enhancements
- Clean up and reorder it a bit
- Test which adds invalid attributes
- Test which makes sure that the 'distinguishedName' attribute cannot be modified
- Test which makes sure that we cannot change the RDN/'name' attribute through a modify request
2009-10-02 19:29:31 +02:00
Jelmer Vernooij
08ce8a4752 Mark test_security_descriptor_add_neg as known failing (for now). 2009-09-08 23:58:52 +02:00
Zahari Zahariev
af0946c101 Basic tests for nTSceurityDescriptor both SDDL and BASE64 format
These are updated second eddition unittests using ldb.add_ldif()
and ldb.modify_ldif(). Unittests are found to work when using
the right local domain SID. Negative test separated.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-09-08 23:58:52 +02:00
Matthias Dieter Wallnöfer
fc90586a42 s4:ldap.py - Adds a test for the primary group behaviour
This passes the Windows Server behaviour. Also SAMBA 4 should match it.

Also some small enhancement.
2009-09-07 08:37:25 +02:00
Andrew Tridgell
341477347d fixed the updateNow schema test to use a canonical OID
The expression time.strftime("%s", time.gmtime())[3:] leads to a
string with a leading 0. When added then read back from the prefix map
this leads to a different string, so it is never found.

Use the simpler str(random.randint(a,b)) expression instead
2009-08-17 11:14:07 +10:00
Matthias Dieter Wallnöfer
44dfb2902e s4: Better way to call "dom_sid_to_rid" from ldap.py 2009-08-14 00:14:15 +02:00
Matthias Dieter Wallnöfer
159a33a7d4 s4:test for "primaryGroupToken"
Tests for the right behaviour of this introduced constructed attribute.
Since we don't support the read-only-ness of those attributes yet, I commented
some lines out.
Also I had to add a function for python which converts domain SIDs in RIDs.
And a small fix for the "groupType" test.
2009-08-11 12:59:17 +02:00
Anatoliy Atanasov
e3631da158 Test for schemaUpdateNow command 2009-07-08 14:40:20 +10:00
Andrew Bartlett
5c19c60c57 s4:ldb Add test for integer normalisation behaviour
This uses groupType as the example, but this actually applies to all
integer types in AD.

Andrew Bartlett
2009-06-19 11:32:01 +10:00
Andrew Bartlett
82ad66e9df s4:ldb Make it possible to re-run ldap.py again
The parentGUID test didn't clean up after itself correctly.

Andrew Bartlett
2009-04-14 10:52:33 +10:00
Andrew Tridgell
a1ebb85020 added support for parentGUID
This is made up of 4 parts:

  1) change our schema to include the parentGUID attribute type

  2) in the add hook in the objectclass module, get the objectGUID of
  the parent and add it to the message as parentGUID

  3) in the rename hook in the objectclass module, get the objectGUID
  of the new parent, and insert an async modify request after the
  renmam is done

  4) added a simple test suite
2009-03-17 14:18:53 +11:00
Jelmer Vernooij
e548660c87 Fix ldap.py test on systems that *can* find the record (the search fails here locally). 2009-01-08 12:51:19 +01:00
Jelmer Vernooij
ea1ff069a5 Fix ldap.py test. 2009-01-07 11:06:00 +01:00
Andrew Bartlett
59f8c1d98a Use new error constant (missing from 6efb7ff9) 2009-01-07 17:09:26 +11:00
Jelmer Vernooij
6efb7ff981 Fix various Python-related bugs. 2008-12-21 07:34:27 +01:00
Jelmer Vernooij
5076c64d43 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-19 21:47:45 +01:00
Jelmer Vernooij
6998ef4fe0 Avoid use of parentheses in Python import statements, as it's not supported by Python2.3. 2008-12-19 21:47:31 +01:00
Andrew Bartlett
eb3714acfa s4:ldb: add some python tests for extended dns
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:29 +11:00