[
https://issues.apache.org/jira/browse/DIRSERVER-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lécharny resolved DIRSERVER-2094.
------------------------------------------
Resolution: Fixed
Fixed with commit f838fcd5e0e2ff7bdcbcfa97f2e4d58b145464f3
> Cleanup code duplication in tests
> ---------------------------------
>
> Key: DIRSERVER-2094
> URL: https://issues.apache.org/jira/browse/DIRSERVER-2094
> Project: Directory ApacheDS
> Issue Type: Task
> Components: code quality, test
> Reporter: Stefan Seelmann
> Priority: Major
>
> In tests there is endless duplication of setting up a JNDI LDAP connection,
> for example:
> {code}
> Hashtable<String, String> env = new Hashtable<String, String>();
> env.put( Context.INITIAL_CONTEXT_FACTORY,
> "com.sun.jndi.ldap.LdapCtxFactory" );
> env.put( Context.PROVIDER_URL, "ldap://" +
> InetAddress.getLocalHost().getHostName() + ":"
> + getLdapServer().getPort() );
> env.put( Context.SECURITY_AUTHENTICATION, "simple" );
> env.put( Context.SECURITY_PRINCIPAL,
> "uid=hnelson,ou=users,dc=example,dc=com" );
> env.put( Context.SECURITY_CREDENTIALS, "secret" );
> env.put( "java.naming.ldap.attributes.binary", "krb5key" );
> {code}
> That should (TM) be clean up.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]