Search in sources :

Example 31 with StageEntity

use of pipelite.entity.StageEntity in project pipelite by enasequence.

the class StageEntityAsserter method assertCompletedKubernetesStageEntity.

public static void assertCompletedKubernetesStageEntity(StageService stageService, TestType testType, KubernetesTestConfiguration kubernetesTestConfiguration, String pipelineName, String processId, String stageName) {
    String exitCode = testType.lastExitCode(pipelineName, processId, stageName);
    StageEntity stageEntity = assertCompletedStageEntity(stageService, testType, pipelineName, processId, stageName);
    assertKubernetesStageEntity(testType, kubernetesTestConfiguration, stageEntity);
    assertThat(stageEntity.getResultParams()).contains("\"exit code\" : \"" + exitCode + "\"");
    assertThat(stageEntity.getResultParams()).contains("\"job id\" :");
    assertThat(String.valueOf(stageEntity.getExitCode())).isEqualTo(exitCode);
}
Also used : StageEntity(pipelite.entity.StageEntity)

Example 32 with StageEntity

use of pipelite.entity.StageEntity in project pipelite by enasequence.

the class StageEntityAsserter method assertSubmittedKubernetesStageEntity.

public static void assertSubmittedKubernetesStageEntity(StageService stageService, TestType testType, KubernetesTestConfiguration kubernetesTestConfiguration, String pipelineName, String processId, String stageName) {
    StageEntity stageEntity = assertSubmittedStageEntity(stageService, testType, pipelineName, processId, stageName);
    assertKubernetesStageEntity(testType, kubernetesTestConfiguration, stageEntity);
}
Also used : StageEntity(pipelite.entity.StageEntity)

Aggregations

StageEntity (pipelite.entity.StageEntity)32 Stage (pipelite.stage.Stage)15 Test (org.junit.jupiter.api.Test)11 Process (pipelite.process.Process)8 StageState (pipelite.stage.StageState)5 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)4 Timed (io.micrometer.core.annotation.Timed)3 ProcessEntity (pipelite.entity.ProcessEntity)3 ProcessBuilder (pipelite.process.builder.ProcessBuilder)3 ExecutorParameters (pipelite.stage.parameters.ExecutorParameters)3 StageLogEntity (pipelite.entity.StageLogEntity)2 JsonSerializableExecutor (pipelite.executor.JsonSerializableExecutor)2 SyncTestExecutor (pipelite.executor.SyncTestExecutor)2 StageExecutorResult (pipelite.stage.executor.StageExecutorResult)2 SimpleLsfExecutorParameters (pipelite.stage.parameters.SimpleLsfExecutorParameters)2 ZonedDateTime (java.time.ZonedDateTime)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 Assertions (org.assertj.core.api.Assertions)1