ValidateConfigDefinitionsTest.java revision 530e312594f469609337996570cf0ea504554a68
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions copyright 2011-2015 ForgeRock AS
*/
public class ValidateConfigDefinitionsTest extends DirectoryServerTestCase {
public void startServer() throws Exception {
}
/**
* Returns all AbstractManagedObjectDefinition objects that are
* defined in
*/
}
return params;
}
// Exceptions to config objects having a differnt objectclass
"org.opends.server.admin.std.meta.RootCfgDefn",
"org.opends.server.admin.std.meta.GlobalCfgDefn"
);
if (ldapObjectclassName == null) {
} else {
", the LDAP objectclass must be " + expectedObjectClass +
}
}
ObjectClass configObjectClass = DirectoryServer.getSchema().getObjectClass(ldapObjectclassName.toLowerCase());;
}
Assert.fail("The configuration definition for " + objectDef.getName() + " has the following problems: " + EOL +
}
}
// Exceptions to properties ending in -class being exactly 'java-class'.
// e.g. "prop-name-ending-with-class"
);
// Exceptions to properties ending in -enabled being exactly 'enabled'.
"index-filter-analyzer-enabled",
"subordinate-indexes-enabled"
// e.g. "prop-name-ending-with-enabled"
);
// Exceptions to properties not starting with the name of their config object
"backend-id",
"plugin-type",
"replication-server-id",
"network-group-id",
"workflow-id",
"workflow-element-id",
"workflow-element"
// e.g. "prop-name-starting-with-object-prefix"
);
// We want class properties to be exactly java-class
{
" should probably be java-class. If not, then add " +
propName + " to the CLASS_PROPERTY_EXCEPTIONS array in " +
" this warning.");
}
// We want enabled properties to be exactly enabled
{
" should probably be just 'enabled'. If not, then add " +
propName + " to the ENABLED_PROPERTY_EXCEPTIONS array in " +
" this warning.");
}
// It's redundant for properties to be prefixed with the name of their objecty
{
" should not be prefixed with the name of the config object because" +
" this is redundant. If you disagree, then add " +
propName + " to the OBJECT_PREFIX_PROPERTY_EXCEPTIONS array in " +
" this warning.");
}
// LDAP attribute name is consistent with the property name
", the LDAP attribute must be " + expectedLdapAttr + " instead of " + ldapAttrName).append(EOL + EOL);
}
// LDAP attribute exists
" to use ldap attribute " + ldapAttrName + ", but this attribute is not in the schema ").append(EOL + EOL);
} else {
// LDAP attribute is multivalued if the property is multivalued
" as multi-valued, but the corresponding ldap attribute " + ldapAttrName +
}
if (configObjectClass != null) {
// If it's mandatory in the schema, it must be mandatory on the config property
" as mandatory even though the corresponding ldap attribute " + ldapAttrName +
}
" the corresponding ldap attribute " + ldapAttrName +
", but this attribute is not an allowed attribute on the configuration " +
}
}
}
}
}