-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed as not planned
Labels
kind/bugSomething isn't workingSomething isn't working
Description
Describe the bug
I am trying to use quarkus.test.integration-test-profile
I have a src/main/resources/application.properties
with:
quarkus.test.integration-test-profile=it
quarkus.native.resources.includes=application-it.properties
and a src/main/resources/application-it.properties
with:
foo=bar
and a endpoint:
@Path("/hello")
public class GreetingResource {
@ConfigProperty(name = "foo", defaultValue = "xx")
String foo;
@GET
@Produces(MediaType.TEXT_PLAIN)
@Path("/foo")
public String foo() {
return foo;
}
}
and my tests:
@QuarkusTest
class GreetingResourceTest {
@Test
void testProp() {
given()
.when().get("/hello/foo")
.then()
.statusCode(200)
.body(is(getFoo()));
}
protected String getFoo() {
return "xx";
}
}
@QuarkusIntegrationTest
class GreetingResourceIT extends GreetingResourceTest {
protected String getFoo() {
return "bar";
}
}
this works fine with:
mvn package => OK (found 'xx')
mvn verify -DskipITs=false => OK (found 'bar')
but it fails if I do:
mvn verify -Pnative => KO (found 'xx')
if I remove file application-it.properties
and use application.properties
as:
quarkus.test.integration-test-profile=it
%it.foo=bar
then the native IT works (found 'bar').
Expected behavior
should find 'bar'
Actual behavior
find the default value 'xx'.
How to Reproduce?
Output of uname -a
or ver
No response
Output of java -version
No response
Quarkus version or git rev
3.25.0
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working