From 7cf3bbcc5ce9f22e0140fab051b1fe850cf0161d Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 25 Oct 2017 12:13:57 +1300 Subject: [PATCH] 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 --- source4/dsdb/tests/python/linked_attributes.py | 5 +++++ 1 file changed, 5 insertions(+) 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') -- 2.11.4.GIT