From 0d97a7da226d93b8b87467efde523aa2120ceabc Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Fri, 07 Jun 2013 14:08:13 +0000
Subject: [PATCH] Fix for OPENDJ-925, OPENDJ-926, and overall schema management. Review CR-1806. Back a few years ago, when we did the SVR4 package, we split the schema into read-only (Install) and writable (Instance). With the template model in 2.6, the whole schema is under config, and we should never edit/change the one in the template. So, I've removed all code related to the 2 locations for schema, reverted some I10N messages to their previous versions, and tidy up code and tests. All unit-tests are passing. And it's also possible to change the instance.loc and run setup and have a fully functioning server :-)
---
opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/jmx/JmxPrivilegeTestCase.java | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/jmx/JmxPrivilegeTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/jmx/JmxPrivilegeTestCase.java
index 4fc8526..988b906 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/jmx/JmxPrivilegeTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/jmx/JmxPrivilegeTestCase.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
+ * Portions Copyright 2011-2013 ForgeRock AS
*/
package org.opends.server.protocols.jmx;
@@ -75,7 +75,7 @@
/**
- * This class provides a set of test cases for the Directory Server JMX
+ * This class provides a set of test cases for the Directory Server JMX
* privilege subsystem.
*/
public class JmxPrivilegeTestCase
@@ -312,7 +312,7 @@
DeleteOperation deleteOperation = conn.processDelete(DN
.decode("cn=Unprivileged Root,cn=Root DNs,cn=config"));
assertEquals(deleteOperation.getResultCode(), ResultCode.SUCCESS);
-
+
deleteOperation = conn.processDelete(DN
.decode("cn=Unprivileged JMX Root,cn=Root DNs,cn=config"));
assertEquals(deleteOperation.getResultCode(), ResultCode.SUCCESS);
@@ -416,7 +416,7 @@
assertTrue(false, "Unexpected exception - error message: "
+ e.getMessage());
}
-
+
// Add JMX_READ privilege
InternalClientConnection rootConnection =
InternalClientConnection.getRootConnection();
@@ -426,7 +426,7 @@
ModifyOperation modifyOperation =
rootConnection.processModify(DN.decode(user), mods);
assertEquals(modifyOperation.getResultCode(), ResultCode.SUCCESS);
-
+
// Try connection withoutJMX_READ privilege
// Expected result: success
try
@@ -449,7 +449,7 @@
assertTrue(false, "Unexpected exception - error message: "
+ e.getMessage());
}
-
+
// remove JMX_READ privilege
mods = new ArrayList<Modification>();
mods.add(new Modification(ModificationType.DELETE,
@@ -457,7 +457,7 @@
modifyOperation =
rootConnection.processModify(DN.decode(user), mods);
assertEquals(modifyOperation.getResultCode(), ResultCode.SUCCESS);
-
+
// Try connection withoutJMX_READ privilege
// Expected result: failed
try
@@ -480,7 +480,7 @@
+ e.getMessage());
}
}
-
+
/**
* Tests to ensure that search operations in the server configuration properly
@@ -773,7 +773,7 @@
hasPrivilege);
- String schemaDirectory = SchemaConfigManager.getSchemaDirectoryPath(true);
+ String schemaDirectory = SchemaConfigManager.getSchemaDirectoryPath();
String identifier;
Entry authNEntry = conn.getAuthenticationInfo().getAuthenticationEntry();
--
Gitblit v1.10.0