Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
To support the withoutPrepackagedExtensions methods of the HiveMQContainer, we (HiveMQ) initially built in a workaround that copies extensions into /opt/hivemq/temp-extensions/ instead of /opt/hivemq/extensions/ and modifies the container entrypoint and command to move the extensions into their right place.
We have some upcoming changes to the HiveMQ container images that will remove the need for the withoutPrepackagedExtensions methods in most cases. This change applies the workaround only if any of the withoutPrepackagedExtensions methods are called.
This change also makes it easier to use the withCopyToContainer method with a Transferable argument to copy files into an HiveMQ extension's folder by just specifying /opt/hivemq/extensions/ as containerPath without needing to know about any implementation details. Currently, one is limited to methods like withFileInExtensionHomeFolder that apply the "temp-extensions" workaround internally, but these methods only support MountableFile arguments.
To support the
withoutPrepackagedExtensions
methods of theHiveMQContainer
, we (HiveMQ) initially built in a workaround that copies extensions into/opt/hivemq/temp-extensions/
instead of/opt/hivemq/extensions/
and modifies the container entrypoint and command to move the extensions into their right place.We have some upcoming changes to the HiveMQ container images that will remove the need for the
withoutPrepackagedExtensions
methods in most cases. This change applies the workaround only if any of thewithoutPrepackagedExtensions
methods are called.This change also makes it easier to use the
withCopyToContainer
method with aTransferable
argument to copy files into an HiveMQ extension's folder by just specifying/opt/hivemq/extensions/
as containerPath without needing to know about any implementation details. Currently, one is limited to methods likewithFileInExtensionHomeFolder
that apply the "temp-extensions" workaround internally, but these methods only supportMountableFile
arguments.