summaryrefslogtreecommitdiff
path: root/source4/torture/drs/python/repl_schema.py
AgeCommit message (Collapse)AuthorFilesLines
2023-08-14s4:torture:drs: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-01-31s4-selftest/drs Allow some DRS tests to operate against an IPAndrew Bartlett1-8/+1
This is not comprehensive, but makes some manual test runs easier by avoiding the need for DNS names to resolve. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10635 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-02-07pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall1-2/+2
TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-12-14PY3: change shebang to python3 in source4/torture dirJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-08-24PEP8: fix W293: blank line contains whitespaceJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E502: the backslash is redundant between bracketsJoe Guo1-2/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E231: missing whitespace after ','Joe Guo1-3/+3
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E128: continuation line under-indented for visual indentJoe Guo1-4/+4
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E127: continuation line over-indented for visual indentJoe Guo1-2/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E123: closing bracket does not match indentation of opening ↵Joe Guo1-1/+1
bracket's line Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E714: test for object identity should be 'is not'Joe Guo1-2/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-07-13s4/torure/drs/python: Fix incorrect use of unicode which doesn't exist in py3Noel Power1-1/+1
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-06-28s4/torture/drs/python: don't double-call enable/disable replicationDouglas Bagnall1-3/+0
This is repeating work done in setup/teardown or doubling up in place (self._enable_all_repl includes self._enable_inbound_repl) Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-28drs torture python: convert 'except X, (tuple)' to 'except X as e'Noel Power1-3/+6
In addition to converting the except line another line is also added for each except to extract the tuple contents. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-06-15dsdb: Ensure replication of renames works in schema partitionAndrew Bartlett1-0/+31
This caused failures against vampire_dc (on large-dc), likely due to more frequent replication propagating the record before it was renamed. The DC ran out of RIDs and RID allocation causes schema replication, which failed. Signed-off-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12841 Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-14torture/drs: Add a test for dn+binary linked attributesBob Campbell1-4/+65
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
2017-02-14torture/drs: run repl_schema in vampire_2000_dc environment as wellBob Campbell1-7/+13
This will be necessary as linked attributes are handled differently in Windows 2000. We also only check msDS-IntId if we have a functional level of > Windows 2000, as this attribute is not present on lower domain function levels. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
2017-02-14torture/drs: generate linkID for test rather than specifyingBob Campbell1-1/+1
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
2016-08-11selftest: Move repl_schema test to a distinct OID prefixAndrew Bartlett1-13/+13
We also take the chance to make it clearer that the number being passed in should be unique. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-28msds_intid: Add test for schema linked attributesGarming Sam1-1/+86
This test only covers the forward link case. NOTE: We can't confirm this against Windows because they prevent us from modifying the schema for the schema classes. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-19selftest: Disable all replication during most replication testsAndrew Bartlett1-6/+6
Rather than just disabling inbound replication, consider that there may be another server in the test network, and ensure we do not replicate to or from it either. replica_sync.py is omitted, as it tests some more subtle variations of the DISABLE_INBOUND_REPL flag. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-07-19selftest: Make repl_schema more robust by disabling replication before the testAndrew Bartlett1-6/+13
We also ensure the two DCs are in sync before the test starts Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-06-06repl: Retry replication of the schema on WERR_DS_DRA_SCHEMA_MISMATCHAndrew Bartlett1-3/+41
This makes us replicate the schema, and then go back to what we asked to replicate originally, when the schema changes. This should make the replication much more robust after schema changes Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-06-06selftest: Use random OIDs from under the Samba OID arcAndrew Bartlett1-12/+14
The urgent_replication.py test used the OID of uid, and this caused other tests to fail The other random OIDs should have been from under our arc, not under iso.member-body.us We split up the range a little to avoid some of the birthday paradox, in the tests that create multiple OIDs. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz
2013-05-14selftests-drs: make our generated class subclass of classschemaMatthieu Patou1-1/+2
Without this change objectclass=["top", "classSchema", "Foobar"] will not be sorted correctly and will generated an error saying that class Foobar is unreleated to classSchema (which is not true). It's mimicing what other classes of the default schema are doing (ie. contact) Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue May 14 07:07:19 CEST 2013 on sn-devel-104
2013-02-22torture-drs: Make the samba4.drs.repl_schema.python emit failures, not ↵Andrew Bartlett1-1/+5
errors on add failure This then allows this particular failure to be masked with a knownfail. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2011-02-27s4/drs-test: Remove unused importsKamen Mazdrashki1-7/+0
2011-02-20s4/drs-tests: Inherit DrsReplSchemaTestCase from DrsBaseTestCaseKamen Mazdrashki1-45/+2
and remove duplicated functionality
2011-02-02s4-python Ensure we add the Samba python path first.Andrew Bartlett1-1/+1
This exact form of the construction is important, and we match on it in the installation scripts. Andrew Bartlett
2011-01-03Use TestCase.get_credentials() where possible.Jelmer Vernooij1-1/+1
2010-12-15s4-test/repl_schema: remove unused and commented out codeKamen Mazdrashki1-3/+0
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Wed Dec 15 01:37:10 CET 2010 on sn-devel-104
2010-12-15s4-test/repl_schema: Make sure every object is with unique nameKamen Mazdrashki1-2/+5
This way, test writer don't have to be careful to choose unique objects suffix
2010-12-15s4-test/repl_schema: use 'top' as default base class for our test ↵Kamen Mazdrashki1-1/+1
classSchema objects Otherwise we will end up passing whole inheritance chain every time we create some new fancy classSchema object (as the 'cls-A' and 'cls-B' ones in test_classWithCustomAttribute test)
2010-12-15s4-test/repl_schema: New test to test a classSchema with custom attributeKamen Mazdrashki1-0/+24
Create new Attribute and a Class, that has value for newly created attribute. This should check code path that searches for AttributeID_id in Schema cacheThis test. It also tests how we replicate a leaf classSchema that inherits from a new classSchema with attribute added - tests both dsdb_attribute_drsuapi_to_ldb() and _dsdb_syntax_OID_obj_drsuapi_to_ldb() syntax handler
2010-12-02s4-test/repl_schema: Test class inheritance through subClassOfKamen Mazdrashki1-1/+26
2010-12-02s4-test/repl_schema: Make ERR_NO_SUCH_OBJECT visible to usKamen Mazdrashki1-0/+1
We've lost this import somehow, now it is back in :)
2010-12-02s4-test/repl_schema: Test classSchema and attributeSchema replication in ↵Kamen Mazdrashki1-0/+18
separate tests
2010-12-01s4-test/schema: Extend the test to replicate a Class with Attribute with ↵Kamen Mazdrashki1-2/+10
"mayContain" relation Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Wed Dec 1 13:30:45 CET 2010 on sn-devel-104
2010-11-29s4-repl_schema: fixed ldb exception handlingAndrew Tridgell1-2/+4
2010-11-28s4-python: Fix formatting of docstrings for the purpose of pydoctor.Jelmer Vernooij1-4/+6
2010-11-23s4-test/repl_schema: Refactor the test a little bit toKamen Mazdrashki1-31/+59
- Cleanup imports - make sure we have testtools and subunit imported - use dictionaries instead of LDIFs for schema modification so now callers for _make_class can easily add new attributes for created class - simplify a little bit classSchema creation - test attributeSchema replication Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Tue Nov 23 18:44:46 CET 2010 on sn-devel-104
2010-11-22s4-test/repl_schema: Remote global ldb connectionsKamen Mazdrashki1-25/+7
Although unlikely, Jelmer pointed out that using persistent SamDB connections between test may interfere with tests behaviour (and is not xUnit compliant anyway) Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Mon Nov 22 15:24:03 CET 2010 on sn-devel-104
2010-11-11s4-test: repl_schema - Make sure LdbError and ERR_NO_SUCH_OBJECT are visibleKamen Mazdrashki1-0/+1
2010-11-08s4-test: Initial implementation for Schema replication black box testKamen Mazdrashki1-0/+174