You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]:
images.configure() will not create a new slot within images.settings, so we added images.settings['mosquitto'] = {} before.
After we did that, we found images.configure() will also not honor the options kwarg.
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.
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]:
images.configure()
will not create a new slot withinimages.settings
, so we addedimages.settings['mosquitto'] = {}
before.images.configure()
will also not honor theoptions
kwarg.images.settings
will not be sufficient. We also had to add a minimal image class derived fromBaseImage
[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
The text was updated successfully, but these errors were encountered: