Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apache/directory-studio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/Fedora389dsLdapServer.java')
-rw-r--r--tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/Fedora389dsLdapServer.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/Fedora389dsLdapServer.java b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/Fedora389dsLdapServer.java
new file mode 100644
index 000000000..b856ee563
--- /dev/null
+++ b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/Fedora389dsLdapServer.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.studio.test.integration.junit5;
+
+
+import static org.apache.directory.studio.test.integration.junit5.Constants.LOCALHOST;
+
+
+/**
+ * An 389ds implementation of a test LDAP server.
+ *
+ * This implementation expects that an existing 389ds server is running
+ * and connection parameters are provided via environment variables.
+ */
+public class Fedora389dsLdapServer extends TestLdapServer
+{
+ private static final String FEDORA_389DS_HOST = getEnvOrDefault( "FEDORA_389DS_HOST", LOCALHOST );
+ private static final int FEDORA_389DS_PORT = Integer.parseInt( getEnvOrDefault( "FEDORA_389DS_PORT", "21389" ) );
+ private static final int FEDORA_389DS_PORT_SSL = Integer
+ .parseInt( getEnvOrDefault( "FEDORA_389DS_PORT_SSL", "21636" ) );
+ private static final String FEDORA_389DS_ADMIN_DN = getEnvOrDefault( "FEDORA_389DS_ADMIN_DN",
+ "cn=Directory Manager" );
+ private static final String FEDORA_389DS_ADMIN_PASSWORD = getEnvOrDefault( "FEDORA_389DS_ADMIN_PASSWORD", "admin" );
+
+ public static Fedora389dsLdapServer getInstance()
+ {
+ return new Fedora389dsLdapServer();
+ }
+
+
+ private Fedora389dsLdapServer()
+ {
+ super( LdapServerType.Fedora389ds, FEDORA_389DS_HOST, FEDORA_389DS_PORT, FEDORA_389DS_PORT_SSL,
+ FEDORA_389DS_ADMIN_DN, FEDORA_389DS_ADMIN_PASSWORD );
+ }
+
+}