Search in sources :

Example 31 with Launch

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

the class BuildAndStartDistTest method testStartUsingCliArgs.

@Test
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false" })
@Order(2)
void testStartUsingCliArgs(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertStarted();
    cliResult.assertLocalCache();
}
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 32 with Launch

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

the class ClusterConfigDistTest method testCustomCacheStackInConfigFile.

@Test
@BeforeStartDistribution(ConfigureCacheUsingAsyncEncryption.class)
@Launch({ "start-dev", "--cache-config-file=cache-ispn-asym-enc.xml" })
void testCustomCacheStackInConfigFile(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    assertTrue(cliResult.getOutput().contains("ERROR: server.jks"));
}
Also used : CLIResult(org.keycloak.it.junit5.extension.CLIResult) DistributionTest(org.keycloak.it.junit5.extension.DistributionTest) Test(org.junit.jupiter.api.Test) BeforeStartDistribution(org.keycloak.it.junit5.extension.BeforeStartDistribution) Launch(io.quarkus.test.junit.main.Launch)

Example 33 with Launch

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

the class ClusterConfigDistTest method changeClusterSetting.

@Test
@Launch({ "start-dev", "--cache=ispn" })
void changeClusterSetting(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertClusteredCache();
}
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 34 with Launch

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

the class ClusterConfigDistTest method testStartDevDefaultsToLocalCaches.

@Test
@Launch({ "start-dev" })
void testStartDevDefaultsToLocalCaches(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertStartedDevMode();
    cliResult.assertLocalCache();
}
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 35 with Launch

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

the class ClusterConfigDistTest method testWinStartDefaultsToClustering.

@Test
@EnabledOnOs(value = { OS.WINDOWS }, disabledReason = "different shell behaviour on Windows.")
@Launch({ "start", "--auto-build", "--log-level=\"info,org.infinispan.remoting.transport.jgroups.JGroupsTransport:debug", "--http-enabled=true\"", "--hostname-strict=false" })
void testWinStartDefaultsToClustering(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertStarted();
    cliResult.assertClusteredCache();
    assertTrue(cliResult.getOutput().contains("JGroups protocol stack: UDP"));
}
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