Search in sources :

Example 36 with Launch

use of io.quarkus.test.junit.main.Launch 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 37 with Launch

use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.

the class FeaturesDistTest method testEnablePreviewFeatures.

@Test
@Launch({ StartDev.NAME, "--features=preview" })
public void testEnablePreviewFeatures(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 38 with Launch

use of io.quarkus.test.junit.main.Launch 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 39 with Launch

use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.

the class FeaturesDistTest method testEnableOnBuild.

@Test
@Launch({ Build.NAME, "--features=preview", "--cache=local" })
@Order(1)
public void testEnableOnBuild(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertBuild();
    assertPreviewFeaturesEnabled(cliResult);
}
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)

Example 40 with Launch

use of io.quarkus.test.junit.main.Launch in project keycloak by keycloak.

the class FeaturesDistTest method testWinEnableMultipleFeatures.

@Test
@EnabledOnOs(value = { OS.WINDOWS }, disabledReason = "different shell escaping behaviour on Windows.")
@Launch({ StartDev.NAME, "--features=\"token-exchange,admin-fine-grained-authz\"" })
public void testWinEnableMultipleFeatures(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertStartedDevMode();
    assertThat(cliResult.getOutput(), CoreMatchers.allOf(containsString("Preview feature enabled: admin_fine_grained_authz"), containsString("Preview feature enabled: token_exchange")));
    assertFalse(cliResult.getOutput().contains("declarative-user-profile"));
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) EnabledOnOs(org.junit.jupiter.api.condition.EnabledOnOs) 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)102 Test (org.junit.jupiter.api.Test)101 CLIResult (org.keycloak.it.junit5.extension.CLIResult)98 DistributionTest (org.keycloak.it.junit5.extension.DistributionTest)70 Order (org.junit.jupiter.api.Order)37 TestMethodOrder (org.junit.jupiter.api.TestMethodOrder)37 CLITest (org.keycloak.it.junit5.extension.CLITest)23 BeforeStartDistribution (org.keycloak.it.junit5.extension.BeforeStartDistribution)19 EnabledOnOs (org.junit.jupiter.api.condition.EnabledOnOs)14 File (java.io.File)3 Path (java.nio.file.Path)3 RawDistRootPath (org.keycloak.it.utils.RawDistRootPath)3 StartCommandTest (org.keycloak.it.cli.StartCommandTest)2 Pattern (java.util.regex.Pattern)1 KeepServerAlive (org.keycloak.it.junit5.extension.KeepServerAlive)1 PostgreSQLTest (org.keycloak.it.storage.database.PostgreSQLTest)1