Search in sources :

Example 11 with Launch

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

Example 12 with Launch

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

the class QuarkusPropertiesDistTest method testIgnoreQuarkusSystemPropertyAtBuild.

@Test
@Launch({ "-Dquarkus.log.console.level=info", "build" })
@Order(4)
void testIgnoreQuarkusSystemPropertyAtBuild(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)

Example 13 with Launch

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

the class QuarkusPropertiesDistTest method buildFirstWithUnknownQuarkusBuildProperty.

@Test
@BeforeStartDistribution(UpdateHibernateMetricsFromQuarkusProps.class)
@Launch({ "build", "--metrics-enabled=true" })
@Order(8)
void buildFirstWithUnknownQuarkusBuildProperty(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    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) BeforeStartDistribution(org.keycloak.it.junit5.extension.BeforeStartDistribution) Launch(io.quarkus.test.junit.main.Launch)

Example 14 with Launch

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

the class QuarkusPropertiesDistTest method testUnknownQuarkusBuildTimePropertyApplied.

@Test
@KeepServerAlive
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false" })
@Order(9)
void testUnknownQuarkusBuildTimePropertyApplied(LaunchResult result) {
    CLIResult cliResult = (CLIResult) result;
    cliResult.assertNoBuild();
    when().get("/metrics").then().statusCode(200).body(containsString("vendor_hibernate_cache_query_plan_total"));
}
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) KeepServerAlive(org.keycloak.it.junit5.extension.KeepServerAlive)

Example 15 with Launch

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

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