Search in sources :

Example 6 with StackType

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType in project cloudbreak by hortonworks.

the class StackCreatorServiceTest method testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenWorkloadStackTypeAndNotDistroXRequest.

@Test
public void testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenWorkloadStackTypeAndNotDistroXRequest() {
    Stack stack = new Stack();
    stack.setType(StackType.WORKLOAD);
    StackType actual = underTest.determineStackTypeBasedOnTheUsedApi(stack, false);
    assertEquals(StackType.LEGACY, actual);
}
Also used : StackType(com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 7 with StackType

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType in project cloudbreak by hortonworks.

the class StackCreatorServiceTest method testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenDatalakeStackTypeAndNotDistroXRequest.

@Test
public void testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenDatalakeStackTypeAndNotDistroXRequest() {
    Stack stack = new Stack();
    stack.setType(StackType.DATALAKE);
    StackType actual = underTest.determineStackTypeBasedOnTheUsedApi(stack, false);
    assertEquals(StackType.DATALAKE, actual);
}
Also used : StackType(com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 8 with StackType

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType in project cloudbreak by hortonworks.

the class StackCreatorServiceTest method testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenDatalakeStackTypeAndDistroXRequest.

@Test
public void testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenDatalakeStackTypeAndDistroXRequest() {
    Stack stack = new Stack();
    stack.setType(StackType.DATALAKE);
    StackType actual = underTest.determineStackTypeBasedOnTheUsedApi(stack, true);
    assertEquals(StackType.DATALAKE, actual);
}
Also used : StackType(com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 9 with StackType

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType in project cloudbreak by hortonworks.

the class StackCreatorServiceTest method testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenWorkloadStackTypeAndDistroXRequest.

@Test
public void testDetermineStackTypeBasedOnTheUsedApiShouldReturnWhenWorkloadStackTypeAndDistroXRequest() {
    Stack stack = new Stack();
    stack.setType(StackType.WORKLOAD);
    StackType actual = underTest.determineStackTypeBasedOnTheUsedApi(stack, true);
    assertEquals(StackType.WORKLOAD, actual);
}
Also used : StackType(com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 10 with StackType

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType in project cloudbreak by hortonworks.

the class BlueprintBasedUpgradeValidatorTest method createImageFilterParams.

private ImageFilterParams createImageFilterParams(String blueprintName, StackType stackType) {
    Blueprint blueprint = new Blueprint();
    blueprint.setName(blueprintName);
    return new ImageFilterParams(null, true, null, stackType, blueprint, null, new InternalUpgradeSettings(true, true, true), null);
}
Also used : InternalUpgradeSettings(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.InternalUpgradeSettings) Blueprint(com.sequenceiq.cloudbreak.domain.Blueprint)

Aggregations

StackType (com.sequenceiq.cloudbreak.api.endpoint.v4.common.StackType)9 Stack (com.sequenceiq.cloudbreak.domain.stack.Stack)9 Test (org.junit.jupiter.api.Test)5 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)5 StackV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.StackV4Response)4 StackViewV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.StackViewV4Response)4 NameOrCrn (com.sequenceiq.cloudbreak.api.endpoint.v4.dto.NameOrCrn)3 StackViewV4Responses (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.StackViewV4Responses)3 TransactionExecutionException (com.sequenceiq.cloudbreak.common.service.TransactionService.TransactionExecutionException)3 TransactionRuntimeExecutionException (com.sequenceiq.cloudbreak.common.service.TransactionService.TransactionRuntimeExecutionException)3 Blueprint (com.sequenceiq.cloudbreak.domain.Blueprint)3 AutoscaleStackV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.AutoscaleStackV4Response)2 NotFoundException (com.sequenceiq.cloudbreak.common.exception.NotFoundException)2 CloudbreakImageNotFoundException (com.sequenceiq.cloudbreak.core.CloudbreakImageNotFoundException)2 AutoscaleStack (com.sequenceiq.cloudbreak.domain.projection.AutoscaleStack)2 ShowTerminatedClustersAfterConfig (com.sequenceiq.cloudbreak.service.stack.ShowTerminatedClusterConfigService.ShowTerminatedClustersAfterConfig)2 Workspace (com.sequenceiq.cloudbreak.workspace.model.Workspace)2 DetailedEnvironmentResponse (com.sequenceiq.environment.api.v1.environment.model.response.DetailedEnvironmentResponse)2 ClouderaManagerResourceApi (com.cloudera.api.swagger.ClouderaManagerResourceApi)1 ApiException (com.cloudera.api.swagger.client.ApiException)1