From b6294c84a53dea5ac13c4ef72017483254739271 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 25 Oct 2017 12:17:05 +1300 Subject: linked attribute tests: fix logic for add test We were ensuring that when we got an LdbError it was the right type, but we weren't ensuring we got one at all. The new test doesn't fail. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- source4/dsdb/tests/python/linked_attributes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/dsdb') diff --git a/source4/dsdb/tests/python/linked_attributes.py b/source4/dsdb/tests/python/linked_attributes.py index f0c260564bf..1923f687749 100644 --- a/source4/dsdb/tests/python/linked_attributes.py +++ b/source4/dsdb/tests/python/linked_attributes.py @@ -401,6 +401,8 @@ class LATests(samba.tests.TestCase): self.fail("adding duplicate values, expected " "ERR_ENTRY_ALREADY_EXISTS, (%d) " "got %d" % (ldb.ERR_ENTRY_ALREADY_EXISTS, num)) + else: + self.fail("adding duplicate values succeed when it shouldn't") self.assert_forward_links(g1, [u1, u2, u3, u4]) self.assert_forward_links(g2, [u3, u1]) -- cgit v1.2.1