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

Allow to define system properties with @NativeImageTest #13998

Closed
wants to merge 1 commit into from

Conversation

twasyl
Copy link

@twasyl twasyl commented Dec 21, 2020

Currently it is only possible to pass system properties to the native image that is started using TestResources as test profiles are not allowed in native testing.

However TestResources are always started, no matter they are used with @QuarkusTestResource or not. By having multiple test classes annotated with @NativeImageTest, using test resources may lead to bad configuration depending on the order the resources are started.

There is currently no other way of passing system properties without rebuilding the native image until now. The idea of this PR is to be able to define system properties to use directly using the @NativeImageTest as an instance of the image is started by test class. This makes sense as it is possible to start a native image in production by passing system properties or environment variables. IMHO this respects the Quarkus philosophy as well as provides a way of testing configuration combinations for native images.

@ghost ghost added the area/testing label Dec 21, 2020
@gsmet
Copy link
Member

gsmet commented Jan 4, 2021

@geoand could you have a look at the principle of it? I wonder if we should have a specific repeatable annotation with name and value instead, which would avoid the parsing.

@geoand
Copy link
Contributor

geoand commented Jan 4, 2021

I am pretty sure that the latest master allows you to configure runtime properties.
#13154 is the PR that I am pretty sure brought that capability.

So I think this PR is now redundant

@twasyl
Copy link
Author

twasyl commented Jan 7, 2021

I am pretty sure that the latest master allows you to configure runtime properties.
#13154 is the PR that I am pretty sure brought that capability.

So I think this PR is now redundant

You're right @geoand. I haven't noticed #13154. Closing this.

@twasyl twasyl closed this Jan 7, 2021
@ghost ghost added the triage/invalid This doesn't seem right label Jan 7, 2021
@geoand
Copy link
Contributor

geoand commented Jan 7, 2021

In any case, thanks for your efforts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants