use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class LoggingDistTest method testKeycloakLogFileCreated.
@Test
@EnabledOnOs(value = { OS.LINUX, OS.MAC }, disabledReason = "different shell escaping behaviour on Windows.")
@Launch({ "start-dev", "--log=console,file" })
void testKeycloakLogFileCreated(RawDistRootPath path) {
Path logFilePath = Paths.get(path.getDistRootPath() + File.separator + LoggingPropertyMappers.DEFAULT_LOG_PATH);
File logFile = new File(logFilePath.toString());
assertTrue(logFile.isFile(), "Log file does not exist!");
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class LoggingDistTest method testLogLevelSettingsAppliedWhenJsonEnabled.
@Test
@EnabledOnOs(value = { OS.LINUX, OS.MAC }, disabledReason = "different shell escaping behaviour on Windows.")
@Launch({ "start-dev", "--log-level=off,org.keycloak:debug,org.infinispan:info", "--log-console-output=json" })
void testLogLevelSettingsAppliedWhenJsonEnabled(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
assertFalse(cliResult.getOutput().contains("\"loggerName\":\"io.quarkus\",\"level\":\"INFO\")"));
assertTrue(cliResult.getOutput().contains("\"loggerName\":\"org.keycloak.quarkus.runtime.storage.database.jpa.QuarkusJpaConnectionProviderFactory\",\"level\":\"DEBUG\""));
assertTrue(cliResult.getOutput().contains("\"loggerName\":\"org.infinispan.CONTAINER\",\"level\":\"INFO\""));
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class QuarkusPropertiesAutoBuildDistTest method testWrappedBuildPropertyTriggersBuildButGetsIgnoredWhenSetByQuarkus.
@Test
@BeforeStartDistribution(EnableDatasourceMetrics.class)
@Launch({ "start", "--auto-build", "--http-enabled=true", "--hostname-strict=false", "--cache=local" })
@Order(8)
void testWrappedBuildPropertyTriggersBuildButGetsIgnoredWhenSetByQuarkus(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertBuild();
when().get("/metrics").then().statusCode(404);
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class QuarkusPropertiesDistTest method testIgnoreQuarkusPropertyFromKeycloakConf.
@Test
@BeforeStartDistribution(UpdateConsoleLogLevelToInfoFromKeycloakConf.class)
@Launch({ "build" })
@Order(5)
void testIgnoreQuarkusPropertyFromKeycloakConf(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
assertTrue(cliResult.getOutput().contains("INFO"));
cliResult.assertBuild();
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class QuarkusPropertiesDistTest method testPropertyEnabledAtRuntime.
@Test
@BeforeStartDistribution(QuarkusPropertiesDistTest.UpdateConsoleLogLevelToWarnFromQuarkusProps.class)
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false" })
@Order(2)
void testPropertyEnabledAtRuntime(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
assertFalse(cliResult.getOutput().contains("INFO"));
}
Aggregations