testcontainers / testcontainers-python

Testcontainers is a Python library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.
https://testcontainers-python.readthedocs.io/en/latest/
Apache License 2.0
1.51k stars 281 forks source link

fix(mysql): Add seed support in MySQL #552

Closed OverkillGuy closed 3 months ago

OverkillGuy commented 4 months ago

Ref #541. New capability of "seeding" a db container using image's support for /docker-entrypoint-initdb.d/ folder.

Using the "transferable" system, borrowed from Kafka.

Updates DbContainer to have a new (NOOP-default) _transfer_seed() method, run after _start() and before _connect(), to allow the folder transfer.

Currently implemented only in MySQL, but extensible to others that use the /docker-entrypoint-initdb.d/ system.

OverkillGuy commented 4 months ago

Updated to use "transferable" like kafka does, which makes this support remote docker engines!