adding integration tests to managix: checkpoint
diff --git a/asterix-installer/pom.xml b/asterix-installer/pom.xml
index 1c11763..28b2b13 100644
--- a/asterix-installer/pom.xml
+++ b/asterix-installer/pom.xml
@@ -79,7 +79,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
+ <version>2.2-beta-5</version>
<executions>
<execution>
<configuration>
@@ -94,21 +94,16 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-junit47</artifactId>
- <version>2.12</version>
- </dependency>
- </dependencies>
- <configuration>
- <includes>
- <include>**/*.class</include>
- </includes>
- <excludeGroups>edu.uci.ics.asterix.installer.test.IntegerationTest</excludeGroups>
- </configuration>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
@@ -117,7 +112,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/asterix-installer/src/main/assembly/binary-assembly.xml b/asterix-installer/src/main/assembly/binary-assembly.xml
index 6a0c130..739b444 100644
--- a/asterix-installer/src/main/assembly/binary-assembly.xml
+++ b/asterix-installer/src/main/assembly/binary-assembly.xml
@@ -1,6 +1,7 @@
<assembly>
<id>binary-assembly</id>
<formats>
+ <format>dir</format>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
diff --git a/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java
new file mode 100644
index 0000000..906c839
--- /dev/null
+++ b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java
@@ -0,0 +1,39 @@
+package edu.uci.ics.asterix.installer.test;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+public class AsterixInstallerIntegrationUtil {
+
+ private static String managixHome;
+
+ public static void deinit() {
+
+ }
+
+ public static void init() {
+ // TODO Auto-generated method stub
+ File asterixProjectDir = new File(System.getProperty("user.dir"));
+ File installerTargetDir = new File(asterixProjectDir, "target");
+ System.out.println("asterix project dir" + asterixProjectDir.getAbsolutePath());
+ System.out.println("installer target dir" + installerTargetDir.getAbsolutePath());
+ String managixHomeDirName = installerTargetDir.list(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return new File(dir, name).isDirectory() && name.startsWith("asterix-installer")
+ && name.endsWith("binary-assembly");
+ }
+
+ })[0];
+ managixHome = new File(installerTargetDir, managixHomeDirName).getAbsolutePath();
+ System.out.println("Setting managix home to :" + managixHome);
+ }
+
+ public static String getManagixHome() {
+ return managixHome;
+ }
+
+ public static void main(String [] args){
+ init();
+ }
+}
diff --git a/asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/InstallerIntegrationTest.java b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/InstallerIT.java
similarity index 96%
rename from asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/InstallerIntegrationTest.java
rename to asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/InstallerIT.java
index 852499a..e53f8d4 100644
--- a/asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/InstallerIntegrationTest.java
+++ b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/InstallerIT.java
@@ -17,9 +17,6 @@
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import edu.uci.ics.asterix.installer.command.CommandHandler;
@@ -32,9 +29,7 @@
import edu.uci.ics.asterix.installer.service.ILookupService;
import edu.uci.ics.asterix.installer.service.ServiceProvider;
-@Category(IntegrationTest.class)
-@RunWith(Parameterized.class)
-public class InstallerIntegrationTest {
+public class InstallerIT {
public static final String ASTERIX_INSTANCE_NAME = "asterix";
@@ -103,7 +98,7 @@
return testArgs;
}
- public InstallerIntegrationTest() {
+ public InstallerIT() {
}
diff --git a/asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/IntegrationTest.java b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/IntegrationTest.java
similarity index 100%
rename from asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/IntegrationTest.java
rename to asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/IntegrationTest.java
diff --git a/asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java b/asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java
deleted file mode 100644
index 6e18839..0000000
--- a/asterix-installer/src/test/resources/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package edu.uci.ics.asterix.installer.test;
-
-public class AsterixInstallerIntegrationUtil {
-
- public static void deinit() {
- // TODO Auto-generated method stub
-
- }
-
- public static void init() {
- // TODO Auto-generated method stub
-
- }
-
- public static String getManagixHome() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}