-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28392 from gsmet/2.13.1-backports-3
2.13.1 backports 3
- Loading branch information
Showing
3 changed files
with
63 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
.../io/quarkus/vertx/http/devconsole/DevConsoleConfigMisinterpretedDoubleUnderscoreTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.quarkus.vertx.http.devconsole; | ||
|
||
import org.hamcrest.Matchers; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.test.QuarkusDevModeTest; | ||
import io.restassured.RestAssured; | ||
|
||
/** | ||
* Tests that a system property such as {@code %.intellij.command.histfile."} | ||
* doesn't lead to an exception because {@code "} is incorrectly seen as a quoted property. | ||
* <p> | ||
* Originally the bug stemmed from an environment property {@code __INTELLIJ_COMMAND_HISTFILE__} | ||
* which was (weirdly) interpreted as {@code %.intellij.command.histfile."}, | ||
* but it's much easier to test system properties (which are mutable) | ||
* than environment properties. | ||
*/ | ||
public class DevConsoleConfigMisinterpretedDoubleUnderscoreTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusDevModeTest config = new QuarkusDevModeTest() | ||
.setBuildSystemProperty("%.intellij.command.histfile.\"", "foo") | ||
.withEmptyApplication(); | ||
|
||
@Test | ||
public void testNoFailure() { | ||
RestAssured.get("q/dev/io.quarkus.quarkus-vertx-http/config") | ||
.then() | ||
.statusCode(200).body(Matchers.containsString("Config Editor")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters