use of com.sequenceiq.redbeams.domain.stack.DBStack in project cloudbreak by hortonworks.
the class NetworkParameterAdderTest method testAddParametersWhenAws.
@Test
public void testAddParametersWhenAws() {
Map<String, Object> parameters = new HashMap<>();
DBStack dbStack = new DBStack();
DetailedEnvironmentResponse environment = getAwsDetailedEnvironmentResponse();
parameters = underTest.addParameters(parameters, environment, CloudPlatform.AWS, dbStack);
assertThat(parameters, IsMapContaining.hasEntry(VPC_ID, TEST_VPC_ID));
assertThat(parameters, IsMapContaining.hasEntry(VPC_CIDR, TEST_VPC_CIDR));
assertThat(parameters, IsMapContaining.hasEntry(VPC_CIDRS, Set.of(TEST_VPC_CIDR)));
}
use of com.sequenceiq.redbeams.domain.stack.DBStack in project cloudbreak by hortonworks.
the class NetworkParameterAdderTest method testAddParametersWhenGcp.
@Test
public void testAddParametersWhenGcp() {
Map<String, Object> parameters = new HashMap<>();
DBStack dbStack = new DBStack();
DetailedEnvironmentResponse environment = getGcpDetailedEnvironmentResponse();
parameters = underTest.addParameters(parameters, environment, CloudPlatform.GCP, dbStack);
assertThat(parameters, IsMapContaining.hasEntry(SHARED_PROJECT_ID, "sharedProjectId"));
}
use of com.sequenceiq.redbeams.domain.stack.DBStack in project cloudbreak by hortonworks.
the class SubnetChooserServiceTest method testChooseSubnetsThenCloudPlatformConnectorGetIsCalled.
@Test
public void testChooseSubnetsThenCloudPlatformConnectorGetIsCalled() {
List<CloudSubnet> subnets = List.of();
setupConnector();
DBStack dbStack = new DBStack();
dbStack.setCloudPlatform("MyCloudPlatform");
dbStack.setPlatformVariant("MyPlatformVariant");
underTest.chooseSubnets(subnets, CloudPlatform.AWS, dbStack);
ArgumentCaptor<CloudPlatformVariant> cloudPlatformVariantArgumentCaptor = ArgumentCaptor.forClass(CloudPlatformVariant.class);
verify(cloudPlatformConnectors).get(cloudPlatformVariantArgumentCaptor.capture());
assertEquals("MyCloudPlatform", cloudPlatformVariantArgumentCaptor.getValue().getPlatform().value());
assertEquals("MyPlatformVariant", cloudPlatformVariantArgumentCaptor.getValue().getVariant().value());
}
use of com.sequenceiq.redbeams.domain.stack.DBStack in project cloudbreak by hortonworks.
the class DatabaseServerSslCertificatePrescriptionServiceTest method setUp.
@BeforeEach
void setUp() {
dbStack = new DBStack();
databaseServer = DatabaseServer.builder().build();
databaseStack = new DatabaseStack(null, databaseServer, Map.of(), "");
region = Region.region("myregion");
location = Location.location(region);
}
use of com.sequenceiq.redbeams.domain.stack.DBStack in project cloudbreak by hortonworks.
the class AllocateDatabaseServerHandlerTest method setUp.
@BeforeEach
void setUp() {
dbStack = new DBStack();
dbStack.setCloudPlatform(CloudPlatform.AWS.name());
lenient().when(dbStackService.getById(anyLong())).thenReturn(dbStack);
databaseStack = new DatabaseStack(null, null, Map.of(), "");
}
Aggregations