-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Access to DevService properties in QuarkusIntegrationTest #18854
Comments
/cc @geoand |
This is very interesting. We can certainly inject some kind of dev-services configuration lookup service into the test that users could query. @gsmet @stuartwdouglas WDYT? |
#18862 is what I have in mind |
Introduce the ability to inject context into @QuarkusIntegrationTest tests
Is there a quick workaround to access these properties in the current release version? |
Unfortunately, no |
Maybe we should provide a way to inject these clients into QuarkusIntegrationTest. |
So injecting a data source for example? |
Having easy access to the database and messaging systems etc. would be really good. Providing fixtures in terms of data inside integration tests is currently not exactly easy, especially with DevServices. Giving clients back to the test would really help. Being able to programmatically use entities to prefill the database would also be very nice. |
I have a quarkus integration test, which uses the devservices of Mongodb and Kafka. I can see the properties being passed to my docker image, so that gets started with the correct details.
However, I would also like to access those services from my test (to add 'input' messages to kafka and to verify data written to the DB), but it is currently impossible to determine the correct connection details.
Could the properties from the following line, somehow, also made available in the context of the integration test. For example using
ConfigProvider.getConfig().getValue
or simply using@ConfigProperty
, or anything else.quarkus/test-framework/junit5/src/main/java/io/quarkus/test/junit/QuarkusIntegrationTestExtension.java
Line 105 in c10b430
The text was updated successfully, but these errors were encountered: