Closed bitphage closed 3 years ago
Yes, this is definitely an issue. In https://github.com/schireson/pytest-mock-resources/issues/79 I described some options. Looks like I even wrote a POC in https://github.com/schireson/pytest-mock-resources/pull/81 (for postgres, but easy to extend from there).
I'll see if i can find some time over the weekend or something to push 81 over the finish line, which should make extending the method for mysql easy to extend in the same way
The above PR should have exposed https://pytest-mock-resources.readthedocs.io/en/latest/api.html#fixture-config which should enable you to customize things like the targeted docker image. Should be released in 1.5.0
This feature, in particular, is difficult to test in CI due to the kind of fixed nature of its docker companion image stuff, so happy to keep contributing fixes if you run into issues we didn't encounter.
Closing for now, unless/until you come back with issues
container/mysql.py
has a hardcodedconfig
dict and it's being used immediately by creating_mysql_container = ...
object. This makes impossible to override these config settings, for example docker image.