getncchanges.py: Add a new test for replication
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 6 Jun 2017 06:06:22 +0000 (18:06 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 18 Aug 2017 04:07:12 +0000 (06:07 +0200)
commit4cfc29688584ca69c43abb770d1e721d1eab1480
tree25632e3355393747076e48aba025b89bdc17ab80
parentfae5df891c11f642cbede9e4e3d845c49c5f86b8
getncchanges.py: Add a new test for replication

This adds a new test to check that if objects are modified during a
replication, then those objects don't wind up missing from the
replication data.

Note that when this scenario occurs, samba returns the objects in a
different order to Windows. This test doesn't care what order the
replicated objects get returned in, so long as they all have been
received by the end of the test.

As part of this, I've refactored _check_replication() in drs_base.py so
it can be reused in new tests. In these cases, the objects are split up
over multiple different chunks. So asserting that the objects are returned
in a specific order makes it difficult to run the same test on both Samba
and Windows.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12972
source4/selftest/tests.py
source4/torture/drs/python/drs_base.py
source4/torture/drs/python/getncchanges.py [new file with mode: 0644]