[java-identity-provider COMMIT] /trunk/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java
noreply at shibboleth.net
noreply at shibboleth.net
Mon Nov 17 21:31:49 EST 2014
Author: tzeller
Date: Mon Nov 17 21:31:49 2014
New Revision: 6926
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6926&view=rev
Log:
Disable STARTTLS in ldap.properties for integration tests via property replacement.
Modified:
trunk/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java
Modified: trunk/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java?rev=6926&r1=6925&r2=6926&view=diff
==============================================================================
--- trunk/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java (original)
+++ trunk/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java Mon Nov 17 21:31:49 2014
@@ -43,7 +43,24 @@
@Nonnull private final InMemoryDirectoryServer directoryServer;
/**
- * Default constructor.
+ * Constructor without STARTTLS support.
+ *
+ * @param LDIF the LDIF resource to be imported
+ *
+ * @throws LDAPException if the in-memory directory server cannot be created
+ * @throws IOException if the LDIF resource cannot be imported
+ */
+ public InMemoryDirectory(@Nonnull final Resource ldif) throws LDAPException, IOException {
+ Constraint.isNotNull(ldif, "LDIF resource cannot be null");
+ final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig("dc=example,dc=org", "ou=system");
+ config.setListenerConfigs(InMemoryListenerConfig.createLDAPConfig("default", 10389));
+ config.addAdditionalBindCredentials("cn=Directory Manager", "password");
+ directoryServer = new InMemoryDirectoryServer(config);
+ directoryServer.importFromLDIF(true, new LDIFReader(ldif.getInputStream()));
+ }
+
+ /**
+ * Constructor with STARTTLS support.
*
* @param ldif the LDIF resource to be imported
* @param keystore to use for startTLS
More information about the commits
mailing list