Search in sources :

Example 11 with CLIResult

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

the class FeaturesDistTest method testEnablePrecedenceOverDisable.

@Test
@Launch({ StartDev.NAME, "--features=preview", "--features-disabled=token-exchange" })
public void testEnablePrecedenceOverDisable(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertStartedDevMode();
    assertPreviewFeaturesEnabled((CLIResult) result);
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) DistributionTest(org.keycloak.it.junit5.extension.DistributionTest) Test(org.junit.jupiter.api.Test) Launch(io.quarkus.test.junit.main.Launch)

Example 12 with CLIResult

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

the class StartDevCommandTest method testBuildPropertyAvailable.

@Test
@Launch({ "start-dev", "--db=dev-mem" })
void testBuildPropertyAvailable(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertStartedDevMode();
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) Test(org.junit.jupiter.api.Test) CLITest(org.keycloak.it.junit5.extension.CLITest) Launch(io.quarkus.test.junit.main.Launch)

Example 13 with CLIResult

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

the class ExportDistTest method testMissingDir.

@Test
@Launch({ "export", "--realm=master" })
void testMissingDir(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertError("Must specify either --dir or --file options.");
}
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)

Example 14 with CLIResult

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

the class LoggingDistTest method testSetLastRootLevelIfMultipleSet.

@Test
@Launch({ "start-dev", "--log-level=off,org.keycloak:warn,debug" })
void testSetLastRootLevelIfMultipleSet(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    assertTrue(cliResult.getOutput().contains("DEBUG [org.hibernate"));
    assertFalse(cliResult.getOutput().contains("INFO  [org.keycloak"));
    cliResult.assertStartedDevMode();
}
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)

Example 15 with CLIResult

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

the class QuarkusPropertiesDistTest method testBuildWithPropertyFromQuarkusProperties.

@Test
@Launch({ "build", "--cache=local" })
@Order(1)
void testBuildWithPropertyFromQuarkusProperties(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    assertFalse(cliResult.getOutput().contains("INFO"));
    cliResult.assertBuild();
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) TestMethodOrder(org.junit.jupiter.api.TestMethodOrder) Order(org.junit.jupiter.api.Order) DistributionTest(org.keycloak.it.junit5.extension.DistributionTest) Test(org.junit.jupiter.api.Test) 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