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
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 corrected Feb 8, 2019
pom.xml restructured pom.xml Feb 8, 2019 updated readme Feb 8, 2019

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 **

Running the project

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