Search in sources :

Example 1 with InstanceGroupEphemeralVolumeChecker

use of com.sequenceiq.cloudbreak.service.stack.InstanceGroupEphemeralVolumeChecker in project cloudbreak by hortonworks.

the class StackCreationServiceTest method setUp.

@BeforeEach
void setUp() {
    Whitebox.setInternalState(underTest, "ephemeralVolumeChecker", new InstanceGroupEphemeralVolumeChecker());
    CloudConnector<Object> cloudConnector = Mockito.mock(CloudConnector.class);
    when(cloudPlatformConnectors.get(any())).thenReturn(cloudConnector);
    MetadataCollector metadataCollector = Mockito.mock(MetadataCollector.class);
    when(cloudConnector.metadata()).thenReturn(metadataCollector);
    Authenticator authenticator = Mockito.mock(Authenticator.class);
    when(cloudConnector.authentication()).thenReturn(authenticator);
    InstanceStoreMetadata instanceStoreMetadata = getInstanceStoreMetadata();
    when(metadataCollector.collectInstanceStorageCount(any(), any())).thenReturn(instanceStoreMetadata);
}
Also used : InstanceGroupEphemeralVolumeChecker(com.sequenceiq.cloudbreak.service.stack.InstanceGroupEphemeralVolumeChecker) InstanceStoreMetadata(com.sequenceiq.cloudbreak.cloud.model.InstanceStoreMetadata) MetadataCollector(com.sequenceiq.cloudbreak.cloud.MetadataCollector) Authenticator(com.sequenceiq.cloudbreak.cloud.Authenticator) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Authenticator (com.sequenceiq.cloudbreak.cloud.Authenticator)1 MetadataCollector (com.sequenceiq.cloudbreak.cloud.MetadataCollector)1 InstanceStoreMetadata (com.sequenceiq.cloudbreak.cloud.model.InstanceStoreMetadata)1 InstanceGroupEphemeralVolumeChecker (com.sequenceiq.cloudbreak.service.stack.InstanceGroupEphemeralVolumeChecker)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1