microcks / microcks-quarkus

Quarkus extension that enables embedding Microcks as a DevService managing mocks for dependencies and contract-testing your API endpoints
https://microcks.io
Apache License 2.0
15 stars 3 forks source link

Make a shared DevService expose all the necessary properties #19

Closed lbroudoux closed 9 months ago

lbroudoux commented 9 months ago

Reason/Context

DevServices can be shared among different Quarkus applications running in dev mode. Microcks already provide basic support for this.

Description

When reusing a Microcks DevService that has been instantiated by another Quarkus application, we only retrieve the main HTTP endpoint. We're not able to get access to other properties like grpc.host or grpc.port.

We need to find a way to retrieve all those properties when locating an already running container and feed the Quarkus available properties with that values.

Moreover, all the properties today use the quarks. microns.default prefix and are not indexed on the service name. We must rename them according to the actual desired service name (default should stick as the default value).

Implementation ideas

No response

lbroudoux commented 9 months ago

As of today, we are using the ContainerLocator utility from Quarkus but this one is only able to give you access to one and only one mapped port through a ContainerAddress object.

So we have to chain 2 location resolutions: one using the Http port to get access to the corresponding mapped port, a 2nd one using the gRPC port to get access to the corresponding mapped port as well!