use of com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerContext in project cloudbreak by hortonworks.
the class AzurePollTaskFactoryIntegrationTest method diskEncryptionSetCreationCheckerTaskTest.
@Test
void diskEncryptionSetCreationCheckerTaskTest() {
when(authenticatedContext.getParameter(AzureClient.class)).thenReturn(azureClient);
DiskEncryptionSetCreationCheckerContext checkerContext = new DiskEncryptionSetCreationCheckerContext(RESOURCE_GROUP_NAME, DISK_ENCRYPTION_SET_NAME);
PollTask<DiskEncryptionSetInner> result = underTest.diskEncryptionSetCreationCheckerTask(authenticatedContext, checkerContext);
assertThat(result).isInstanceOf(DiskEncryptionSetCreationCheckerTask.class);
DiskEncryptionSetCreationCheckerTask checkerTask = (DiskEncryptionSetCreationCheckerTask) result;
assertThat(checkerTask.getAuthenticatedContext()).isSameAs(authenticatedContext);
}
use of com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerContext in project cloudbreak by hortonworks.
the class AzurePollTaskFactoryTest method diskEncryptionSetCreationCheckerTaskTest.
@Test
void diskEncryptionSetCreationCheckerTaskTest() {
DiskEncryptionSetCreationCheckerContext checkerContext = new DiskEncryptionSetCreationCheckerContext(RESOURCE_GROUP_NAME, DISK_ENCRYPTION_SET_NAME);
PollTask<DiskEncryptionSetInner> checkerTask = mock(PollTask.class);
when(applicationContext.getBean(DiskEncryptionSetCreationCheckerTask.NAME, authenticatedContext, checkerContext)).thenReturn(checkerTask);
PollTask<DiskEncryptionSetInner> result = underTest.diskEncryptionSetCreationCheckerTask(authenticatedContext, checkerContext);
assertThat(result).isSameAs(checkerTask);
}
use of com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerContext in project cloudbreak by hortonworks.
the class AzureEncryptionResources method pollDiskEncryptionSetCreation.
private DiskEncryptionSetInner pollDiskEncryptionSetCreation(AuthenticatedContext authenticatedContext, String desResourceGroupName, String desName, DiskEncryptionSetInner desInitial) {
LOGGER.info("Initializing poller for the creation of Disk Encryption Set \"{}\" in Resource Group \"{}\".", desName, desResourceGroupName);
DiskEncryptionSetCreationCheckerContext checkerContext = new DiskEncryptionSetCreationCheckerContext(desResourceGroupName, desName);
return diskEncryptionSetCreationPoller.startPolling(authenticatedContext, checkerContext, desInitial);
}
Aggregations