use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class StartAutoBuildDistTest method testStartAutoBuild.
@Test
@Launch({ "start", "--auto-build", "--http-enabled=true", "--hostname-strict=false", "--cache=local" })
@Order(1)
void testStartAutoBuild(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertMessage("Changes detected in configuration. Updating the server image.");
cliResult.assertMessage("Updating the configuration and installing your custom providers, if any. Please wait.");
cliResult.assertMessage("Server configuration updated and persisted. Run the following command to review the configuration:");
cliResult.assertMessage(KeycloakDistribution.SCRIPT_CMD + " show-config");
cliResult.assertMessage("Next time you run the server, just run:");
cliResult.assertMessage(KeycloakDistribution.SCRIPT_CMD + " start --http-enabled=true --hostname-strict=false");
assertFalse(cliResult.getOutput().contains("--cache"));
cliResult.assertStarted();
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class StartAutoBuildDistTest method testShouldNotReAugIfSameDatabase.
@Test
@Launch({ "start", "--auto-build", "--db=dev-mem", "--http-enabled=true", "--hostname-strict=false", "--cache=local" })
@Order(4)
void testShouldNotReAugIfSameDatabase(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertNoBuild();
cliResult.assertStarted();
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class StartAutoBuildDistTest method testReAugWhenNoOptionAfterBuild.
@Test
@Launch({ "start", "--auto-build", "--http-enabled=true", "--hostname-strict=false", "--cache=local" })
@Order(6)
void testReAugWhenNoOptionAfterBuild(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertBuild();
cliResult.assertStarted();
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class BasicDatabaseTest method testImportSucceeds.
@Order(2)
@Test
@Launch({ "import", "--dir=./target/export" })
void testImportSucceeds(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertMessage("target/export");
cliResult.assertMessage("Realm 'master' imported");
cliResult.assertMessage("Import finished successfully");
}
use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.
the class BasicDatabaseTest method testWrongUsername.
@Test
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false", "--db-username=wrong" })
void testWrongUsername(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertMessage("ERROR: Failed to obtain JDBC connection");
assertWrongUsername(cliResult);
}
Aggregations