embedded-database-spring-test icon indicating copy to clipboard operation
embedded-database-spring-test copied to clipboard

Add possibility to make reusable containers

Open iirekm opened this issue 2 years ago • 2 comments

Test containers library has recently added support for withReuse(true), which makes test startup faster, unfortunately I can't find any way to enable this option in this library.

iirekm avatar Oct 29 '21 07:10 iirekm

It should already be possible to enable this option using a container customizer. Just add a bean implementing io.zonky.test.db.provider.postgres.PostgreSQLContainerCustomizer, io.zonky.test.db.provider.mssql.MSSQLServerContainerCustomizer, io.zonky.test.db.provider.mysql.MySQLContainerCustomizer or io.zonky.test.db.provider.mariadb.MariaDBContainerCustomizer based on the database you are currently using.

tomix26 avatar Nov 01 '21 10:11 tomix26

More information is here: https://github.com/zonkyio/embedded-database-spring-test#docker-provider-specific-configuration

tomix26 avatar Nov 01 '21 10:11 tomix26