Search in sources :

Example 1 with DiskEncryptionSetCreationCheckerTask

use of com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerTask 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);
}
Also used : DiskEncryptionSetCreationCheckerTask(com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerTask) DiskEncryptionSetCreationCheckerContext(com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerContext) DiskEncryptionSetInner(com.microsoft.azure.management.compute.implementation.DiskEncryptionSetInner) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

DiskEncryptionSetInner (com.microsoft.azure.management.compute.implementation.DiskEncryptionSetInner)1 DiskEncryptionSetCreationCheckerContext (com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerContext)1 DiskEncryptionSetCreationCheckerTask (com.sequenceiq.cloudbreak.cloud.azure.task.diskencryptionset.DiskEncryptionSetCreationCheckerTask)1 Test (org.junit.jupiter.api.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1