use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method testConvertWithoutEnvTheCustomQueueShouldBeSetToNull.
@Test
void testConvertWithoutEnvTheCustomQueueShouldBeSetToNull() {
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
ClusterV4Request result = testConvertDistroXV1Request();
assertNotNull(result);
assertNull(result.getCustomQueue());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method testConvertWithoutEnvCmConversionShouldNotHappenIfInputCmIsNull.
@Test
void testConvertWithoutEnvCmConversionShouldNotHappenIfInputCmIsNull() {
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
distroXV1RequestInput.getCluster().setCm(null);
ClusterV4Request result = testConvertDistroXV1Request();
assertNotNull(result);
assertNull(result.getCm());
verify(cmConverter, never()).convert(any(ClouderaManagerV1Request.class));
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method testConvertWithoutEnvTheValidateBlueprintShouldBeSet.
@Test
void testConvertWithoutEnvTheValidateBlueprintShouldBeSet() {
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
ClusterV4Request result = testConvertDistroXV1Request();
assertNotNull(result);
assertEquals(distroXV1RequestInput.getCluster().getValidateBlueprint(), result.getValidateBlueprint());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method testConvertWithEnvTheNameShouldBeSetToNull.
@Test
void testConvertWithEnvTheNameShouldBeSetToNull() {
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
ClusterV4Request result = testConvertDistroXV1RequestWithEnvironment();
assertNotNull(result);
assertNull(result.getName());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method createClusterV4Request.
private ClusterV4Request createClusterV4Request() {
ClusterV4Request r = new ClusterV4Request();
r.setBlueprintName("someBlueprint");
r.setGateway(createGatewayV4Request());
r.setDatabases(Set.of("DB1", "DB2"));
r.setUserName("someUserName");
r.setPassword("somePassword");
r.setCm(createClouderaManagerV4Request());
r.setCloudStorage(createCloudStorageRequest());
r.setProxyConfigCrn("someProxyConfigCrn");
return r;
}
Aggregations