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

Provide a fallback method for running a test when you don't have access to MicrocksContainer instance #10

Closed
lbroudoux opened this issue Aug 9, 2023 · 0 comments
Assignees
Labels
component/settings Relates to API/settings availables kind/enhancement Enhancement of existing feature
Milestone

Comments

@lbroudoux
Copy link
Member

Reason/Context

As working on the integration of Microcks as a DevService for Quarkus, it appears that it's difficult 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 unit tests.

As a consequence, the unit cannot invoke microcksContainer.testEndpoint(testRequest) because of the null instance.

Description

As the Quarkus unit test as 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

@lbroudoux lbroudoux added the kind/enhancement Enhancement of existing feature label Aug 9, 2023
@lbroudoux lbroudoux self-assigned this Aug 9, 2023
@lbroudoux lbroudoux added the component/settings Relates to API/settings availables label Aug 9, 2023
@lbroudoux lbroudoux added this to the 0.1.1 milestone Aug 9, 2023
lbroudoux added a commit that referenced this issue Aug 9, 2023
Signed-off-by: Laurent Broudoux <laurent.broudoux@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/settings Relates to API/settings availables kind/enhancement Enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

1 participant