directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-enmasse git commit: FC-83 - Cleanup rest test processing
Date Tue, 31 Mar 2015 11:53:56 GMT
Repository: directory-fortress-enmasse
Updated Branches:
  refs/heads/master 5d300d03a -> 8acaf13bd


FC-83 - Cleanup rest test processing


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/commit/8acaf13b
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/tree/8acaf13b
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/diff/8acaf13b

Branch: refs/heads/master
Commit: 8acaf13bd2ad7a7b9149366f06d076d06d488a1a
Parents: 5d300d0
Author: Shawn McKinney <smckinney@apache.org>
Authored: Tue Mar 31 06:53:43 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Tue Mar 31 06:53:43 2015 -0500

----------------------------------------------------------------------
 README.txt | 21 +++++----------------
 pom.xml    | 42 ++++++++++++++++++++++--------------------
 2 files changed, 27 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/8acaf13b/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
index 87ad301..cc3793a 100755
--- a/README.txt
+++ b/README.txt
@@ -21,7 +21,7 @@
 ___________________________________________________________________________________
 ###################################################################################
 README for Fortress Rest Application Installation
-Last updated: February 16, 2015
+Last updated: March 31, 2015
 ___________________________________________________________________________________
 ###################################################################################
 # SECTION 0.  Prerequisites for Fortress Rest installation and usage
@@ -63,7 +63,7 @@ a. Open a command prompt on target machine in the root folder of the directory-f
 b. Set java home and maven home
 
 c. Run maven install:
-# mvn clean install -DskipTests
+# mvn clean install
 
 d. Build the javadoc:
 # mvn javadoc:javadoc
@@ -96,7 +96,7 @@ ________________________________________________________________________________
 # SECTION 4:  Load Test Users
 ###################################################################################
 Run maven install with load file:
-# mvn install -Dload.file=./src/main/resources/FortressRestServerRoles.xml -DskipTests=true
+# mvn install -Dload.file=./src/main/resources/FortressRestServerRoles.xml
 
 ###################################################################################
 # SECTION 5:  Instructions to Deploy Fortress Rest application to Tomcat
@@ -137,25 +137,14 @@ ________________________________________________________________________________
 ###################################################################################
 # SECTION 6:  Instructions to test Fortress Rest application
 ###################################################################################
-Run maven test
-# mvn verify -Dnoload
+Run unit test:
+# mvn -Dtest=EmTest test
 
 notes:
     - The Fortress Rest application must be deployed and running within your servlet container
before the unit tests will complete successfully.  If your app server
       is running on a separate machine, or using port other than 8080, adjust the settings
accordingly in src/main/test/java/org/apache/directory/fortress/rest/EmTest.java
     - For learning and troubleshooting, it is recommended that you use an HTTP proxy program,
like Axis' tpMon to intercept the HTTP/XML request/responses between Fortress rest client
and server.
     - The tests depend on user, 'demoUser4', already provisioned into LDAP assigned necessary
role, during section 3.
-    - If for any reason these tests should not be run during maven processing, adjust the
following setting in project's pom.xml (set to 'true'):
-
-    <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.12</version>
-        <configuration>
-            <skipTests>true</skipTests>
-        </configuration>
-    </plugin>
-
 ___________________________________________________________________________________
 ###################################################################################
 # SECTION 7:  Alternate testing procedures

http://git-wip-us.apache.org/repos/asf/directory-fortress-enmasse/blob/8acaf13b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b31175d..724ccfd 100755
--- a/pom.xml
+++ b/pom.xml
@@ -90,7 +90,7 @@
     <version.httpclient>3.1</version.httpclient>
     <version.java>1.7</version.java>
     <version.javadoc>2.9.1</version.javadoc>
-    <version.junit>4.11</version.junit>
+    <version.junit>4.12</version.junit>
     <version.log4j>1.2.17</version.log4j>
     <version.servlet-api>2.5.0</version.servlet-api>
     <version.slf4j.log4j12>1.7.7</version.slf4j.log4j12>
@@ -107,10 +107,6 @@
     <javadoc.stylesheet>${basedir}/src/main/java/org/openldap/enmasse/fortress-javadoc.css</javadoc.stylesheet>
     <base.dir>.</base.dir>
     <src.java.dir>${base.dir}/src/main/java</src.java.dir>
-    <!--cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode-->
-    <test>org.apache.directory.fortress.rest.EmTest</test>
-    <!--<title>${project.name} ${project.version}</title>-->
-    <skipTests>true</skipTests>
   </properties>
 
   <dependencies>
@@ -121,7 +117,7 @@
       <version>${project.version}</version>
     </dependency>
 
-    <!-- EnMasse Dependencies -->
+    <!-- CXF Dependencies -->
     <dependency>
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-bundle</artifactId>
@@ -202,7 +198,7 @@
       <version>${version.spring.dao}</version>
     </dependency>
 
-    <!-- General Dependencies -->
+    <!-- General Rest Test Dependencies -->
     <dependency>
       <groupId>commons-httpclient</groupId>
       <artifactId>commons-httpclient</artifactId>
@@ -338,18 +334,23 @@
         </executions>
       </plugin>
 
-      <!-- unit test (change to integration test) -->
+      <!-- Fires on 'mvn -Dtest=ClassName' where ClassName is junit test class name, for
this project: -->
+      <!-- mvn -Dtest=EmTest -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <skipTests>false</skipTests>
-          <systemProperties>
-            <property>
-              <name>version</name>
-              <value>${project.version}</value>
-            </property>
-          </systemProperties>
+          <systemPropertyVariables>
+            <version>${project.version}</version>
+          </systemPropertyVariables>
+          <excludes>
+            <exclude>${exclude.tests}</exclude>
+          </excludes>
+          <includes>
+            <include>${include.tests}</include>
+          </includes>
+          <groups>${testcase.groups}</groups>
+          <runOrder>random</runOrder>
         </configuration>
       </plugin>
 
@@ -403,10 +404,9 @@
           <execution>
             <phase>test</phase>
             <configuration>
-              <target name="fortress-load"
-                  unless="noload"
-                  description="Loads fortress rest rbac policy into ldap">
-                <echo message="###############  Run Fortress Ant script to load policy
 ###############"/>
+              <target name="fortress-load"  if="load.file"
+                  description="Loads fortress rbac policy files into ldap">
+                <echo message="###############  Run Fortress Policy Load  ###############"/>
                 <java
                     classname="org.apache.tools.ant.launch.Launcher"
                     fork="true"
@@ -440,7 +440,8 @@
                   <sysproperty key="version" value="${project.version}"/>
                   <sysproperty key="tenant" value="HOME"/>
                   <arg value="-buildfile"/>
-                  <arg file="./src/main/resources/FortressRestServerPolicy.xml"/>
+                  <arg file="./${load.file}" />
+<!--                  <arg file="./src/main/resources/FortressRestServerPolicy.xml"/>-->
                 </java>
               </target>
             </configuration>
@@ -469,6 +470,7 @@
   </reporting>
 
   <profiles>
+
     <profile>
       <id>release-sign-artifacts</id>
       <activation>


Mime
View raw message