From: Douglas Bagnall Date: Tue, 24 Oct 2017 23:13:57 +0000 (+1300) Subject: linked attribute tests: ensure duplicate deletes fail X-Git-Tag: tevent-0.9.34~99 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7cf3bbcc5ce9f22e0140fab051b1fe850cf0161d;p=thirdparty%2Fsamba.git linked attribute tests: ensure duplicate deletes fail We can't remove the same thing twice in the same message. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/tests/python/linked_attributes.py b/source4/dsdb/tests/python/linked_attributes.py index 705c9d5c0db..f0c260564bf 100644 --- a/source4/dsdb/tests/python/linked_attributes.py +++ b/source4/dsdb/tests/python/linked_attributes.py @@ -306,6 +306,11 @@ class LATests(samba.tests.TestCase): self.remove_linked_attribute(g1, []) self.assert_forward_links(g1, []) + # removing a duplicate link in the same message should fail + self.add_linked_attribute(g2, [u1, u2]) + self.assertRaises(ldb.LdbError, + self.remove_linked_attribute,g2, [u1, u1]) + def _test_la_links_delete_link_reveal(self): u1, u2 = self.add_objects(2, 'user', 'u_del_link_reveal') g1, g2 = self.add_objects(2, 'group', 'g_del_link_reveal')