Gumichan01 / testcontainers-poc

Test apps by using throwaway database instances with Testcontainers — POC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test container POC

This project is an attempt to use a disposable throwaway instance of a database.

This code uses Testcontainers.

Content

This project tests access to two databases:

  • Redis
  • MySQL

The code that uses the Redis instance is based on existing examples.
The code that uses the MySQL instance is based on this project.

Build

This project uses Maven to build and test programs.

mvn compile

Test

sudo docker run -it --rm -v $PWD:$PWD -w $PWD -v /var/run/docker.sock:/var/run/docker.sock maven:3 mvn test

Since the database instances are dockerized, tests must be launched as root

License

This little POC is under the MIT License.


About

Test apps by using throwaway database instances with Testcontainers — POC

License:MIT License


Languages

Language:Java 100.0%