From 32ad9b1a1e5f14a05dbc04df51cf75b108cd6f99 Mon Sep 17 00:00:00 2001
From: Ian Packer <ian.packer@forgerock.com>
Date: Mon, 15 Jun 2015 14:55:52 +0000
Subject: [PATCH] CR-7233: Additional test to cover OPENDJ-1797 in the SDK-based entry validation
---
opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java
index f54cb49..6c65249 100644
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java
+++ b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java
@@ -924,6 +924,28 @@
}
/**
+ * Tests schema checking for an entry that contains an undefined objectclass
+ * when there is no structural objectclass and no structural objectclass checking.
+ *
+ * @throws Exception
+ * If an unexpected problem occurs.
+ */
+ @Test
+ public void testUndefinedObjectClassNoStructural() throws Exception {
+ // @formatter:off
+ final Entry e = newEntry(
+ "dn: o=test",
+ "objectClass: top",
+ "objectClass: xxxundefinedxxx");
+ // @formatter:on
+
+ assertDoesNotConformToSchema(e, defaultPolicy().requireSingleStructuralObjectClass(Action.IGNORE));
+
+ e.removeAttribute("objectClass", "xxxundefinedxxx");
+ assertConformsToSchema(e, defaultPolicy().requireSingleStructuralObjectClass(Action.IGNORE));
+ }
+
+ /**
* Tests schema checking for an entry with a valid single structural
* objectclass.
*
--
Gitblit v1.10.0