selftest: Use a unique(ish) OU for every run of getnc_unpriv
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 17 Aug 2017 00:30:30 +0000 (12:30 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 29 Aug 2017 05:23:28 +0000 (07:23 +0200)
commitb6e6379514ad49e798a80b8464ebfc2b77f86574
tree8b2e01ec0e19fe81e64b0981f841470d2978adba
parentd6a384b24bb762abc340158bbcd3aad828a4b490
selftest: Use a unique(ish) OU for every run of getnc_unpriv

An intermittent problem I noticed with tests in the past is that the
setup can fail to create the base OU because it already exists.
I believe this is because the previous testenv DC has replicated out the
test object, but not its deletion at the point that the next testenv DC
starts running the test.

This only seemed to happen very occassionally (I haven't seen it
happen with getnc_unpriv yet, but I also haven't run it through the
autobuild yet).

Using same randomness in the test OU should help avoid this sort of
problem, and it matches what some other replication tests do.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/torture/drs/python/getnc_unpriv.py