knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject [1/4] knox git commit: [KNOX-647] Rename LDAP artifacts from test to demo
Date Thu, 14 Jan 2016 17:16:29 GMT
Repository: knox
Updated Branches:
  refs/heads/master 0bcc6594e -> 3158bc842


http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test-ldap/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/src/main/resources/log4j.properties b/gateway-test-ldap/src/main/resources/log4j.properties
deleted file mode 100644
index 40b5546..0000000
--- a/gateway-test-ldap/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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.
-
-log4j.rootLogger=ERROR,stdout
-log4j.threshhold=ALL
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %m%n
-
-#log4j.logger.org.apache.directory=INFO
-#log4j.logger.org.apache.hadoop.gateway=INFO
-#log4j.logger.org.apache.hadoop.gateway=DEBUG
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test-ldap/src/main/resources/users.ldif
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/src/main/resources/users.ldif b/gateway-test-ldap/src/main/resources/users.ldif
deleted file mode 100644
index f75edb8..0000000
--- a/gateway-test-ldap/src/main/resources/users.ldif
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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.
-
-version: 1
-
-dn: dc=hadoop,dc=apache,dc=org
-objectclass: organization
-objectclass: dcObject
-o: Hadoop at Apache.org
-dc: hadoop
-description: Makers of Hadoop
-
-# entry for a sample people container
-# please replace with site specific values
-dn: ou=people,dc=hadoop,dc=apache,dc=org
-objectclass:top
-objectclass:organizationalUnit
-ou: people
-
-# entry for a sample end user
-# please replace with site specific values
-dn: uid=guest,ou=people,dc=hadoop,dc=apache,dc=org
-objectclass:top
-objectclass:person
-objectclass:organizationalPerson
-objectclass:inetOrgPerson
-cn: Guest
-sn: User
-uid: guest
-userPassword:guest-password
-

http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java
b/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java
deleted file mode 100644
index 75f439e..0000000
--- a/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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.hadoop.gateway.security.ldap;
-
-import org.apache.directory.api.ldap.model.exception.LdapAuthenticationException;
-import org.apache.directory.api.ldap.model.exception.LdapException;
-import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.LdapNetworkConnection;
-import org.apache.directory.server.protocol.shared.transport.TcpTransport;
-import org.apache.directory.server.protocol.shared.transport.Transport;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.ServerSocket;
-
-import static org.junit.Assert.fail;
-
-public class SimpleLdapServerTest {
-
-  private static int port;
-  private static File ldifFile;
-  private static SimpleLdapDirectoryServer ldap;
-
-  @BeforeClass
-  public static void setup() throws Exception {
-    port = findFreePort();
-    ldifFile = new File( ClassLoader.getSystemResource( "users.ldif" ).toURI() );
-    ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", ldifFile, new Transport[]{
new TcpTransport( port ) } );
-    ldap.start();
-  }
-
-  @AfterClass
-  public static void cleanup() throws Exception {
-    if( ldap != null ) {
-      ldap.stop( true );
-    }
-  }
-
-  private static int findFreePort() throws IOException {
-    ServerSocket socket = new ServerSocket(0);
-    int port = socket.getLocalPort();
-    socket.close();
-    return port;
-  }
-
-  @Test
-  public void testBind() throws LdapException, IOException {
-    LdapConnection connection;
-
-    connection = new LdapNetworkConnection( "localhost", port );
-    try {
-      connection.bind( "uid=guest,ou=people,dc=hadoop,dc=apache,dc=org", "guest-password"
);
-    } finally {
-      connection.close();
-    }
-
-    connection = new LdapNetworkConnection( "localhost", port );
-    try {
-      connection.bind( "uid=nobody,ou=people,dc=hadoop,dc=apache,dc=org", "guest-password"
);
-      fail( "Expected LdapAuthenticationException" );
-    } catch ( LdapAuthenticationException e ) {
-      // Expected
-    } finally {
-      connection.close();
-    }
-
-    connection = new LdapNetworkConnection( "localhost", port );
-    try {
-      connection.bind( "uid=guest,ou=people,dc=hadoop,dc=apache,dc=org", "wrong-password"
);
-      fail( "Expected LdapAuthenticationException" );
-    } catch ( LdapAuthenticationException e ) {
-      // Expected
-    } finally {
-      connection.close();
-    }
-
-  }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-test/pom.xml b/gateway-test/pom.xml
index 9d60ef7..b0016e0 100644
--- a/gateway-test/pom.xml
+++ b/gateway-test/pom.xml
@@ -48,7 +48,7 @@
 
         <dependency>
             <groupId>${gateway-group}</groupId>
-            <artifactId>gateway-test-ldap</artifactId>
+            <artifactId>gateway-demo-ldap</artifactId>
             <scope>test</scope>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/hsso-release/pom.xml
----------------------------------------------------------------------
diff --git a/hsso-release/pom.xml b/hsso-release/pom.xml
index 117f669..7f93201 100644
--- a/hsso-release/pom.xml
+++ b/hsso-release/pom.xml
@@ -169,11 +169,11 @@
 
         <dependency>
             <groupId>${gateway-group}</groupId>
-            <artifactId>gateway-test-ldap</artifactId>
+            <artifactId>gateway-demo-ldap</artifactId>
         </dependency>
         <dependency>
             <groupId>${gateway-group}</groupId>
-            <artifactId>gateway-test-ldap-launcher</artifactId>
+            <artifactId>gateway-demo-ldap-launcher</artifactId>
         </dependency>
         <dependency>
             <groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/hsso-release/src/assembly.xml
----------------------------------------------------------------------
diff --git a/hsso-release/src/assembly.xml b/hsso-release/src/assembly.xml
index 59f7aa1..54ed892 100644
--- a/hsso-release/src/assembly.xml
+++ b/hsso-release/src/assembly.xml
@@ -70,7 +70,7 @@
                 <exclude>${gateway-group}:gateway-util-launcher</exclude>
                 <exclude>${gateway-group}:gateway-server-launcher</exclude>
                 <exclude>${gateway-group}:gateway-shell-launcher</exclude>
-                <exclude>${gateway-group}:gateway-test-ldap-launcher</exclude>
+                <exclude>${gateway-group}:gateway-demo-ldap-launcher</exclude>
             </excludes>
         </dependencySet>
         <dependencySet>
@@ -91,7 +91,7 @@
             <outputDirectory>bin</outputDirectory>
             <outputFileNameMapping>ldap.jar</outputFileNameMapping>
             <includes>
-                <include>${gateway-group}:gateway-test-ldap-launcher</include>
+                <include>${gateway-group}:gateway-demo-ldap-launcher</include>
             </includes>
         </dependencySet>
     </dependencySets>

http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f47ebb3..c0ee6f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,8 +39,8 @@
         <module>gateway-util-configinjector</module>
         <module>gateway-util-launcher</module>
         <module>gateway-util-urltemplate</module>
-        <module>gateway-test-ldap</module>
-        <module>gateway-test-ldap-launcher</module>
+        <module>gateway-demo-ldap</module>
+        <module>gateway-demo-ldap-launcher</module>
         <module>gateway-i18n</module>
         <module>gateway-i18n-logging-log4j</module>
         <module>gateway-i18n-logging-sl4j</module>
@@ -986,12 +986,12 @@
 
             <dependency>
                 <groupId>${gateway-group}</groupId>
-                <artifactId>gateway-test-ldap</artifactId>
+                <artifactId>gateway-demo-ldap</artifactId>
                 <version>${gateway-version}</version>
             </dependency>
             <dependency>
                 <groupId>${gateway-group}</groupId>
-                <artifactId>gateway-test-ldap-launcher</artifactId>
+                <artifactId>gateway-demo-ldap-launcher</artifactId>
                 <version>${gateway-version}</version>
             </dependency>
 


Mime
View raw message