Skip to content

Commit 549b1d9

Browse files
committed
Skip fixture add if exists
This can happen if a failure prevents this from being cleaned up properly in the last run.
1 parent dc4db0e commit 549b1d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/integration/test_delete.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ def setup
1414
sn: "delete-user1",
1515
mail: "delete-user1@rubyldap.com"
1616
}
17-
assert @ldap.add(dn: @dn, attributes: attrs), @ldap.get_operation_result.inspect
17+
unless @ldap.search(base: @dn, scope: Net::LDAP::SearchScope_BaseObject)
18+
assert @ldap.add(dn: @dn, attributes: attrs), @ldap.get_operation_result.inspect
19+
end
1820
assert @ldap.search(base: @dn, scope: Net::LDAP::SearchScope_BaseObject)
1921
end
2022

0 commit comments

Comments
 (0)