Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring custom images easily #16

Open
amotl opened this issue Mar 22, 2020 · 0 comments
Open

Configuring custom images easily #16

amotl opened this issue Mar 22, 2020 · 0 comments

Comments

@amotl
Copy link

amotl commented Mar 22, 2020

Dear @vangheem and @masipcat,

for adding Mosquitto (#15), we tried to use the fastpath option to configure custom images [1] first. However, we found these problems when doing it like outlined within [2]:

  1. images.configure() will not create a new slot within images.settings, so we added images.settings['mosquitto'] = {} before.
  2. After we did that, we found images.configure() will also not honor the options kwarg.
  3. An any case, just adding a service definition to images.settings will not be sufficient. We also had to add a minimal image class derived from BaseImage [3] as well as the fixture function itself [4].

While we have been able to work around these issues, we might think about improving this procedure to get closer to DWIM.

With kind regards,
Andreas.

[1] https://github.com/guillotinaweb/pytest-docker-fixtures#configuring-custom-images
[2] https://github.com/hiveeyes/terkin-datalogger/blob/ccaa56d6/test/util/mosquitto.py#L8-L19
[3] https://github.com/hiveeyes/terkin-datalogger/blob/ccaa56d6/test/util/mosquitto.py#L32-L40
[4] https://github.com/hiveeyes/terkin-datalogger/blob/ccaa56d6/test/util/mosquitto.py#L43-L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant