mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
tests: Assert vanishing links doesn't bump USN
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
ecf237cc38
commit
a9c6879bb5
@ -306,11 +306,31 @@ class LATests(samba.tests.TestCase):
|
||||
self.add_linked_attribute(g2, u1)
|
||||
self.add_linked_attribute(g2, u2)
|
||||
|
||||
res = self.samdb.search(g1, scope=ldb.SCOPE_BASE,
|
||||
attrs=['uSNChanged'])
|
||||
old_usn1 = int(res[0]['uSNChanged'][0])
|
||||
|
||||
res = self.samdb.search(g2, scope=ldb.SCOPE_BASE,
|
||||
attrs=['uSNChanged'])
|
||||
old_usn2 = int(res[0]['uSNChanged'][0])
|
||||
|
||||
self.samdb.delete(u1)
|
||||
|
||||
self.assert_forward_links(g1, [])
|
||||
self.assert_forward_links(g2, [u2])
|
||||
|
||||
res = self.samdb.search(g1, scope=ldb.SCOPE_BASE,
|
||||
attrs=['uSNChanged'])
|
||||
new_usn1 = int(res[0]['uSNChanged'][0])
|
||||
|
||||
res = self.samdb.search(g2, scope=ldb.SCOPE_BASE,
|
||||
attrs=['uSNChanged'])
|
||||
new_usn2 = int(res[0]['uSNChanged'][0])
|
||||
|
||||
# Assert the USN on the alternate object is unchanged
|
||||
self.assertEqual(old_usn1, new_usn1)
|
||||
self.assertEqual(old_usn2, new_usn2)
|
||||
|
||||
def test_la_links_delete_user_reveal(self):
|
||||
u1, u2 = self.add_objects(2, 'user', 'u_del_user_reveal')
|
||||
g1, g2 = self.add_objects(2, 'group', 'g_del_user_reveal')
|
||||
|
Loading…
Reference in New Issue
Block a user