From 7e12e82d27d546d4428f8f7c51af0b924cec474b Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Tue, 22 Jan 2008 15:50:12 +0000
Subject: [PATCH] starting from rev #3711, the "match-attribute" property has a default value. Some previous invalid config entries are now valid.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java | 37 +++++--------------------------------
1 files changed, 5 insertions(+), 32 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java
index 4fff22e..96d40c5 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExactMatchIdentityMapperTestCase.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2008 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -40,7 +40,6 @@
import org.opends.server.admin.std.meta.ExactMatchIdentityMapperCfgDefn;
import org.opends.server.admin.std.server.ExactMatchIdentityMapperCfg;
import org.opends.server.api.IdentityMapper;
-import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DirectoryServer;
@@ -208,7 +207,7 @@
throws Exception
{
List<Entry> entries = TestCaseUtils.makeEntries(
- "dn: cn=Exact Match,cn=Identity Mappers,cn=config",
+ "dn: cn=Exact Match 1,cn=Identity Mappers,cn=config",
"objectClass: top",
"objectClass: ds-cfg-identity-mapper",
"objectClass: ds-cfg-exact-match-identity-mapper",
@@ -218,7 +217,7 @@
"ds-cfg-enabled: true",
"ds-cfg-match-attribute: undefinedAttribute",
"",
- "dn: cn=Exact Match,cn=Identity Mappers,cn=config",
+ "dn: cn=Exact Match 2,cn=Identity Mappers,cn=config",
"objectClass: top",
"objectClass: ds-cfg-identity-mapper",
"objectClass: ds-cfg-exact-match-identity-mapper",
@@ -229,7 +228,7 @@
"ds-cfg-match-attribute: uid",
"ds-cfg-match-base-dn: invalidDN",
"",
- "dn: cn=Exact Match,cn=Identity Mappers,cn=config",
+ "dn: cn=Exact Match 3,cn=Identity Mappers,cn=config",
"objectClass: top",
"objectClass: ds-cfg-identity-mapper",
"objectClass: ds-cfg-exact-match-identity-mapper",
@@ -238,36 +237,10 @@
"org.opends.server.extensions.ExactMatchIdentityMapper",
"ds-cfg-enabled: true",
"ds-cfg-match-attribute: ",
- "ds-cfg-match-base-dn: o=test",
- "",
- "dn: cn=Exact Match,cn=Identity Mappers,cn=config",
- "objectClass: top",
- "objectClass: ds-cfg-identity-mapper",
- "objectClass: ds-cfg-exact-match-identity-mapper",
- "cn: Exact Match",
- "ds-cfg-java-class: " +
- "org.opends.server.extensions.ExactMatchIdentityMapper",
- "ds-cfg-enabled: true",
"ds-cfg-match-base-dn: o=test"
);
- Entry e = TestCaseUtils.makeEntry(
- "dn: cn=Exact Match,cn=Identity Mappers,cn=config",
- "objectClass: top",
- "objectClass: ds-cfg-identity-mapper",
- "objectClass: ds-cfg-exact-match-identity-mapper",
- "cn: Exact Match",
- "ds-cfg-java-class: " +
- "org.opends.server.extensions.ExactMatchIdentityMapper",
- "ds-cfg-enabled: true");
-
- AttributeType t =
- DirectoryServer.getAttributeType("ds-cfg-match-attribute");
- e.addAttribute(new Attribute(t), new ArrayList<AttributeValue>());
- entries.add(e);
-
-
Object[][] configEntries = new Object[entries.size()][1];
for (int i=0; i < configEntries.length; i++)
{
@@ -291,7 +264,7 @@
@Test(dataProvider = "invalidConfigs",
expectedExceptions = { ConfigException.class,
InitializationException.class })
- public void testInalidConfigs(Entry e)
+ public void testInvalidConfigs(Entry e)
throws Exception
{
ExactMatchIdentityMapperCfg configuration =
--
Gitblit v1.10.0