Skip to content

Commit

Permalink
Verify warning log message when a build time property is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo gonzalez granados committed Jun 15, 2022
1 parent a2ad6a6 commit 0276ac9
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import io.quarkus.test.bootstrap.DevModeQuarkusService;
import io.quarkus.test.scenarios.QuarkusScenario;
import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusSnapshot;
import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion;
import io.quarkus.test.services.DevModeQuarkusApplication;
import io.quarkus.test.utils.AwaitilityUtils;
Expand Down Expand Up @@ -69,4 +70,23 @@ public void shouldDetectChanges() {
() -> app.given().get("/hello").then().statusCode(HttpStatus.SC_OK)
.body("content", is(String.format(HELLO_IN_SPANISH, WORLD))));
}

@Test
@Tag("QUARKUS-2112")
// TODO https://github.com/quarkusio/quarkus/issues/26156
@DisabledOnQuarkusSnapshot(reason = "Looks that warning message params are swapped by mistake")
public void verifyWarningLogWhenBuildPropertyIsUpdated() {
String appName = app.getProperty("quarkus.application.name", "test-http");
String newAppName = "new-test-app";
app.given()
.param("action", "updateProperty")
.param("name", "quarkus.application.name")
.param("value", newAppName)
.post("/q/dev/io.quarkus.quarkus-vertx-http/config")
.then().statusCode(200);

String expectedOutput = String.format("quarkus.application.name is set to '%s' but it is build time fixed to '%s'",
newAppName, appName);
app.logs().assertContains(expectedOutput);
}
}

0 comments on commit 0276ac9

Please sign in to comment.