This project is an attempt to use a disposable throwaway instance of a database.
This code uses Testcontainers.
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.
This project uses Maven to build and test programs.
mvn compile
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
This little POC is under the MIT License.