mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4-dsdb/test: Delete any leftover objects in the beginning of Cross-NC test
This way we ensure that samdb is clean before we make the test Change-Id: I3c6fc94763807394e52b6df41548e9aba8b452c1 Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
ac2931628c
commit
b4ccfbc214
@ -264,6 +264,10 @@ class BaseRestoreObjectTestCase(RestoredObjectAttributesBaseTestCase):
|
|||||||
c2 = "cn=ldaptestcontainer2," + self.configuration_dn
|
c2 = "cn=ldaptestcontainer2," + self.configuration_dn
|
||||||
c3 = "cn=ldaptestcontainer," + self.configuration_dn
|
c3 = "cn=ldaptestcontainer," + self.configuration_dn
|
||||||
c4 = "cn=ldaptestcontainer2," + self.base_dn
|
c4 = "cn=ldaptestcontainer2," + self.base_dn
|
||||||
|
samba.tests.delete_force(self.samdb, c1)
|
||||||
|
samba.tests.delete_force(self.samdb, c2)
|
||||||
|
samba.tests.delete_force(self.samdb, c3)
|
||||||
|
samba.tests.delete_force(self.samdb, c4)
|
||||||
self.samdb.add({
|
self.samdb.add({
|
||||||
"dn": c1,
|
"dn": c1,
|
||||||
"objectclass": "container"})
|
"objectclass": "container"})
|
||||||
@ -293,8 +297,6 @@ class BaseRestoreObjectTestCase(RestoredObjectAttributesBaseTestCase):
|
|||||||
#assert undeletion will work in same nc
|
#assert undeletion will work in same nc
|
||||||
self.undelete_deleted(str(objDeleted1.dn), c4, self.samdb)
|
self.undelete_deleted(str(objDeleted1.dn), c4, self.samdb)
|
||||||
self.undelete_deleted(str(objDeleted2.dn), c3, self.samdb)
|
self.undelete_deleted(str(objDeleted2.dn), c3, self.samdb)
|
||||||
samba.tests.delete_force(self.samdb, c3)
|
|
||||||
samba.tests.delete_force(self.samdb, c4)
|
|
||||||
|
|
||||||
|
|
||||||
class RestoreUserObjectTestCase(RestoredObjectAttributesBaseTestCase):
|
class RestoreUserObjectTestCase(RestoredObjectAttributesBaseTestCase):
|
||||||
|
Loading…
Reference in New Issue
Block a user