Search in sources :

Example 1 with CloudPlatformConnectors

use of com.sequenceiq.cloudbreak.cloud.init.CloudPlatformConnectors in project cloudbreak by hortonworks.

the class DefaultRootVolumeTypeProviderTest method setUp.

@BeforeEach
void setUp() {
    CloudPlatformConnectors cloudPlatformConnectors = mock(CloudPlatformConnectors.class);
    PlatformVariants platformVariants = mock(PlatformVariants.class);
    Map<Platform, Variant> variantMap = new HashMap<>();
    variantMap.put(Platform.platform("GCP"), Variant.variant("GCP"));
    when(platformVariants.getDefaultVariants()).thenReturn(variantMap);
    when(cloudPlatformConnectors.getPlatformVariants()).thenReturn(platformVariants);
    Environment environment = mock(Environment.class);
    when(environment.containsProperty(anyString())).thenReturn(true);
    when(environment.getProperty(anyString(), anyString())).thenReturn("SSD");
    underTest = new DefaultRootVolumeTypeProvider(cloudPlatformConnectors, environment);
}
Also used : Variant(com.sequenceiq.cloudbreak.cloud.model.Variant) CloudPlatformConnectors(com.sequenceiq.cloudbreak.cloud.init.CloudPlatformConnectors) Platform(com.sequenceiq.cloudbreak.cloud.model.Platform) HashMap(java.util.HashMap) PlatformVariants(com.sequenceiq.cloudbreak.cloud.model.PlatformVariants) Environment(org.springframework.core.env.Environment) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

CloudPlatformConnectors (com.sequenceiq.cloudbreak.cloud.init.CloudPlatformConnectors)1 Platform (com.sequenceiq.cloudbreak.cloud.model.Platform)1 PlatformVariants (com.sequenceiq.cloudbreak.cloud.model.PlatformVariants)1 Variant (com.sequenceiq.cloudbreak.cloud.model.Variant)1 HashMap (java.util.HashMap)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 Environment (org.springframework.core.env.Environment)1