microcks / microcks-testcontainers-java

Java lib for Testcontainers that enables embedding Microcks into your JUnit tests with lightweight, throwaway instance thanks to containers.
https://microcks.io
Apache License 2.0
18 stars 3 forks source link

Provide a fallback method for importing artifacts when you don't have access to MicrocksContainer instance #45

Closed lbroudoux closed 2 months ago

lbroudoux commented 3 months ago

Reason/Context

As working on the integration of Microcks as a DevService for Quarkus, it appears that it's challenging to have access to the MicrocksContainer devservice instance. This instance was initialized during the augmentation phase and - for the moment - I don't find any way of injecting it into the CDI context for later consumption by the hot replacer service.

Description

As the Quarkus components have access to the URL where the container is running that way:

@ConfigProperty(name= "quarkus.microcks.default")
String microcksContainerUrl;

we could propose a fallback where a static method of MicrocksContainer is used with an extra argument that is actually this microcksContainerUrl which is the Http endpoint.

Implementation ideas

No response