Skip to content
No description, website, or topics provided.
Java Dockerfile Shell
Branch: master
Clone or download
Horia Constantin
Horia Constantin updated readme
Latest commit 20af643 Feb 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src commented out installing vim to make test faster Feb 8, 2019
.gitignore initial commit Dec 9, 2018
.java-version initial commit Dec 9, 2018
build.sh corrected build.sh Feb 8, 2019
pom.xml restructured pom.xml Feb 8, 2019
readme.md updated readme Feb 8, 2019

readme.md

Integration testing using Docker containers

A example project that demonstrates how to use the docker-maven-plugin and maven-failsafe-plugin to run integration tests.

This repository accompanies this blog post

File overview

  • mysqljdbc.sql - will be copied into /docker-entrypoint-initdb.d/ during docker image creation
  • assembly.xml - determines what classpath resources are made available to the Dockerfile
  • my.cnf - contains the mysqld configuration that gets copied into the docker image
  • Dockerfile - docker-maven-plugin uses this to create the MySQL image. There are two ways to put files in the image: from the classpath (via assembly.xml) and from the same directory as the Dockerfile
  • docker-compose.yml - docker-maven-plugin uses this to launch the MySQL container. You can easily add more containers to this file. Don't forget to update the wait tag from the image run configuration in the pom.xml
  • DatabaseTestUtilities - small utilities for interacting with the DB
  • DatabaseIntegrationTest - the maven-failsafe-plugin looks for integration tests using the pattern **IntegrationTest.java

Running the project

./build.sh int-test
You can’t perform that action at this time.