mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-2397] Run 2 integration tests; fix problems uncovered thereby.
This makes Failsafe run conditional on maven.test.skip, ensures that the test environment is unpacked for that phase, and configures Failsafe as Surefire is. Two *Test.java classes were renamed IT*.java so that Failsafe would run them and Surefire wouldn't.
This commit is contained in:
@@ -114,10 +114,6 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -162,6 +158,18 @@
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/testing</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<classifier>testEnvironment</classifier>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>setupTestEnvironment</id>
|
||||
@@ -169,18 +177,13 @@
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/testing</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<classifier>testEnvironment</classifier>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>setupIntegrationTestEnvironment</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
@@ -202,7 +205,7 @@
|
||||
<executions>
|
||||
<execution>
|
||||
<id>setproperty</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<phase>generate-test-resources</phase> <!-- XXX I think this should be 'initialize' - MHW -->
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
@@ -284,7 +287,7 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Run Unit/Integration Testing! This plugin just kicks off the tests (when enabled). -->
|
||||
<!-- Run Unit Testing! This plugin just kicks off the tests (when enabled). -->
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
@@ -296,6 +299,19 @@
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Run Integration Testing! This plugin just kicks off the tests (when enabled). -->
|
||||
<plugin>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<!-- Specify the dspace.cfg file to use for test environment -->
|
||||
<dspace.configuration>${agnostic.build.dir}/testing/dspace/config/dspace.cfg</dspace.configuration>
|
||||
<!-- Turn off any DSpace logging -->
|
||||
<dspace.log.init.disable>true</dspace.log.init.disable>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@@ -34,10 +34,10 @@ import static org.hamcrest.CoreMatchers.*;
|
||||
*
|
||||
* @author pvillega
|
||||
*/
|
||||
public class CommunityCollectionIntegrationTest extends AbstractIntegrationTest
|
||||
public class ITCommunityCollection extends AbstractIntegrationTest
|
||||
{
|
||||
/** log4j category */
|
||||
private static final Logger log = Logger.getLogger(CommunityCollectionIntegrationTest.class);
|
||||
private static final Logger log = Logger.getLogger(ITCommunityCollection.class);
|
||||
|
||||
protected CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
|
||||
protected CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService();
|
@@ -28,10 +28,10 @@ import static org.hamcrest.CoreMatchers.*;
|
||||
* This is an integration test to validate the metadata classes
|
||||
* @author pvillega
|
||||
*/
|
||||
public class MetadataIntegrationTest extends AbstractIntegrationTest
|
||||
public class ITMetadata extends AbstractIntegrationTest
|
||||
{
|
||||
/** log4j category */
|
||||
private static final Logger log = Logger.getLogger(MetadataIntegrationTest.class);
|
||||
private static final Logger log = Logger.getLogger(ITMetadata.class);
|
||||
|
||||
|
||||
protected CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
|
1
pom.xml
1
pom.xml
@@ -30,6 +30,7 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
|
||||
<java.version>1.7</java.version>
|
||||
<lucene.version>4.10.2</lucene.version>
|
||||
<solr.version>4.10.2</solr.version>
|
||||
|
Reference in New Issue
Block a user