Search in sources :

Example 21 with CLIResult

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

the class ImportDistTest method testMissingDir.

@Test
@Order(2)
@Launch({ "import", "--dir=." })
void testMissingDir(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertMessage("Realm 'master' imported");
    cliResult.assertMessage("Import finished successfully");
}
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 22 with CLIResult

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

the class ImportDistTest method testExport.

@Test
@Order(1)
@Launch({ "export", "--realm=master", "--dir=." })
void testExport(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertMessage("Export of realm 'master' requested.");
    cliResult.assertMessage("Export finished successfully");
}
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 23 with CLIResult

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

the class StartAutoBuildDistTest method testShouldReAugIfConfigChanged.

@Test
@Launch({ "start", "--auto-build", "--db=dev-mem", "--http-enabled=true", "--hostname-strict=false", "--cache=local" })
@Order(3)
void testShouldReAugIfConfigChanged(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertBuild();
    cliResult.assertStarted();
}
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 24 with CLIResult

use of org.keycloak.it.junit5.extension.CLIResult 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();
}
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 25 with CLIResult

use of org.keycloak.it.junit5.extension.CLIResult 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("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) 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)

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