Search in sources :

Example 51 with CLIResult

use of org.keycloak.it.junit5.extension.CLIResult in project keycloak by keycloak.

the class StartAutoBuildDistTest method testStartDevFirstTime.

@Test
@Launch({ "start-dev" })
@Order(7)
void testStartDevFirstTime(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    assertTrue(cliResult.getOutput().contains("Updating the configuration and installing your custom providers, if any. Please wait."));
    cliResult.assertStartedDevMode();
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) TestMethodOrder(org.junit.jupiter.api.TestMethodOrder) Order(org.junit.jupiter.api.Order) Test(org.junit.jupiter.api.Test) DistributionTest(org.keycloak.it.junit5.extension.DistributionTest) Launch(io.quarkus.test.junit.main.Launch)

Example 52 with CLIResult

use of org.keycloak.it.junit5.extension.CLIResult in project keycloak by keycloak.

the class StartCommandDistTest method testStartUsingAutoBuild.

@Test
@Launch({ "start", "--auto-build", "--http-enabled=true", "--hostname-strict=false", "--cache=local" })
void testStartUsingAutoBuild(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("kc.sh show-config");
    cliResult.assertMessage("Next time you run the server, just run:");
    cliResult.assertMessage("kc.sh start --http-enabled=true --hostname-strict=false");
    assertFalse(cliResult.getOutput().contains("--cache"));
    cliResult.assertStarted();
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) Test(org.junit.jupiter.api.Test) StartCommandTest(org.keycloak.it.cli.StartCommandTest) DistributionTest(org.keycloak.it.junit5.extension.DistributionTest) Launch(io.quarkus.test.junit.main.Launch)

Example 53 with CLIResult

use of org.keycloak.it.junit5.extension.CLIResult in project keycloak by keycloak.

the class AbstractStartDabataseTest method testWrongPassword.

@Test
@Launch({ "start-dev", "--db-password=wrong" })
void testWrongPassword(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertMessage("ERROR: Failed to obtain JDBC connection");
    assertWrongPassword(cliResult);
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) Test(org.junit.jupiter.api.Test) Launch(io.quarkus.test.junit.main.Launch)

Example 54 with CLIResult

use of org.keycloak.it.junit5.extension.CLIResult in project keycloak by keycloak.

the class AbstractStartDabataseTest method testWrongUsername.

@Test
@Launch({ "start-dev", "--db-username=wrong" })
void testWrongUsername(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertMessage("ERROR: Failed to obtain JDBC connection");
    assertWrongUsername(cliResult);
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) Test(org.junit.jupiter.api.Test) Launch(io.quarkus.test.junit.main.Launch)

Example 55 with CLIResult

use of org.keycloak.it.junit5.extension.CLIResult in project keycloak by keycloak.

the class CustomTransactionDistTest method testNoXa.

@Test
@Launch({ "build", "--db=mssql", "--transaction-xa-enabled=false" })
void testNoXa(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertBuild();
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) Test(org.junit.jupiter.api.Test) DistributionTest(org.keycloak.it.junit5.extension.DistributionTest) Launch(io.quarkus.test.junit.main.Launch)

Aggregations

Launch (io.quarkus.test.junit.main.Launch)56 Test (org.junit.jupiter.api.Test)56 CLIResult (org.keycloak.it.junit5.extension.CLIResult)56 DistributionTest (org.keycloak.it.junit5.extension.DistributionTest)41 Order (org.junit.jupiter.api.Order)23 TestMethodOrder (org.junit.jupiter.api.TestMethodOrder)23 CLITest (org.keycloak.it.junit5.extension.CLITest)12 BeforeStartDistribution (org.keycloak.it.junit5.extension.BeforeStartDistribution)4 StartCommandTest (org.keycloak.it.cli.StartCommandTest)1