Skip to content

Commit

Permalink
Updated readme abd pom for Fuseki Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Farris committed Dec 17, 2018
1 parent fc2db2f commit afcc4bb
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 8 deletions.
72 changes: 72 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,78 @@
</plugins>
</build>
</profile>
<profile>
<id>fcrepo_fuseki</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<includes>
<include>**/*.class</include>
</includes>
</configuration>
</execution>
</executions>
<configuration>
<groups>org.kgrid.shelf.repository.FedoraFusekiTest</groups>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.26.0</version>
<configuration>
<images>
<image>
<name>yinlinchen/fcrepo4-docker:4.7.5</name>
<alias>fcrepo_fuseki_test</alias>
<run>
<ports>
<port>8080:8080</port>
</ports>
<namingStrategy>alias</namingStrategy>
<wait>
<http>
<url>http://localhost:8080/fcrepo/rest/</url>
<method>GET</method>
<status>200</status>
</http>
<time>1000000</time>
<kill>10000</kill>
<shutdown>5000</shutdown>
</wait>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>ci</id>
<build>
Expand Down
35 changes: 27 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,48 @@ mvn clean verify -P fcrepo_it
The first time we run _mvn verify -P fcrepo_it_ the docker image with only the fcreop running.
The build will wait until the fcrepo is up and running than will run the integration tests.

Integration tests are identified using _@Category(FedoraIntegrationTest.class)_. Once the tests are complete the docker container will be stopped and removed.
Integration tests are identified using _@Category(FedoraIntegrationTest.class)_. Once the tests are complete the docker container will be stopped and removed.

**Tips and Tricks**

* You can start up fcrepo docker instance with

```
mvn docker:start -P fcrepo_it
```
```mvn docker:start -P fcrepo_it```

and stop it with

```mvn docker:stop -P fcrepo_it```

Yo can keep the fcrepo container running after the tests running with the _docker.keepRunning_ switch
```mvn -Ddocker.keepRunning clean verify -P fcrepo_it```
Once started, access [Docker FCRepo](http://localhost:8080/fcrepo/rest/)

## Fedora Fuseki Tests

Fuseki tests are identified using _@Category(FedoraFusekiTest.class)_. These use a docker instance of
Fedora that includes Tomcat 8.0.53, Fedora 4.7.5, Solr 4.10.3 ,Apache Karaf 4.0.5, Fuseki 2.3.1, Fcrepo-camel-toolbox 4.7.2

_NOTE: this is not run as a part of CircleCI build because of the heavy weight nature of the full Fedora image_
```
mvn docker:stop -P fcrepo_it
mvn clean verify -P fcrepo_fuseki
```
**Tips and Tricks**

* You can start up fcrepo docker instance with

```mvn docker:start -P fcrepo_fuseki```

and stop it with

```mvn docker:stop -P fcrepo_fuseki```

Yo can keep the fcrepo container running after the tests running with the _docker.keepRunning_ switch
```
mvn -Ddocker.keepRunning clean verify -P fcrepo_it
```mvn -Ddocker.keepRunning clean verify -P fcrepo_fuseki```

```
Once started, access [Docker FCRepo](http://localhost:8080/fcrepo/rest/)


## Fedora Repository Characterization Tests

A set of tests that help the KGrid team understand the behavior of the [Fedora Repository](https://wiki.duraspace.org/display/FF) in
Expand Down

0 comments on commit afcc4bb

Please sign in to comment.