use of com.sequenceiq.environment.parameter.dto.ParametersDto in project cloudbreak by hortonworks.
the class EnvironmentDetailsToCDPEnvironmentDetailsConverterTest method testConversionResourceEncryptionEnabledWhenAWSNOTResourceEncryptionEnabledShouldReturnResourceEncryptionEnabledFalse.
@Test
public void testConversionResourceEncryptionEnabledWhenAWSNOTResourceEncryptionEnabledShouldReturnResourceEncryptionEnabledFalse() {
ParametersDto parametersDto = ParametersDto.builder().build();
when(environmentDetails.getParameters()).thenReturn(parametersDto);
UsageProto.CDPEnvironmentDetails cdpEnvironmentDetails = underTest.convert(environmentDetails);
Assertions.assertFalse(cdpEnvironmentDetails.getAwsDetails().getResourceEncryptionEnabled());
}
use of com.sequenceiq.environment.parameter.dto.ParametersDto in project cloudbreak by hortonworks.
the class EnvironmentDetailsToCDPEnvironmentDetailsConverterTest method testConversionResourceEncryptionEnabledWhenAzureNOTResourceEncryptionEnabledShouldReturnResourceEncryptionEnabledFalse.
@Test
public void testConversionResourceEncryptionEnabledWhenAzureNOTResourceEncryptionEnabledShouldReturnResourceEncryptionEnabledFalse() {
ParametersDto parametersDto = ParametersDto.builder().withAzureParameters(AzureParametersDto.builder().withResourceGroup(AzureResourceGroupDto.builder().withResourceGroupUsagePattern(ResourceGroupUsagePattern.USE_SINGLE).build()).build()).build();
when(environmentDetails.getParameters()).thenReturn(parametersDto);
UsageProto.CDPEnvironmentDetails cdpEnvironmentDetails = underTest.convert(environmentDetails);
Assertions.assertFalse(cdpEnvironmentDetails.getAzureDetails().getResourceEncryptionEnabled());
}
use of com.sequenceiq.environment.parameter.dto.ParametersDto in project cloudbreak by hortonworks.
the class EnvironmentDetailsToCDPEnvironmentDetailsConverterTest method testConversionResourceEncryptionEnabledWhenGcpUsingResourceEncryptionEnabledShouldReturnResourceEncryptionEnabledTrue.
@Test
public void testConversionResourceEncryptionEnabledWhenGcpUsingResourceEncryptionEnabledShouldReturnResourceEncryptionEnabledTrue() {
ParametersDto parametersDto = ParametersDto.builder().withGcpParameters(GcpParametersDto.builder().withEncryptionParameters(GcpResourceEncryptionParametersDto.builder().withEncryptionKey("dummyEncryptionKeyUrl").build()).build()).build();
when(environmentDetails.getParameters()).thenReturn(parametersDto);
UsageProto.CDPEnvironmentDetails cdpEnvironmentDetails = underTest.convert(environmentDetails);
Assertions.assertTrue(cdpEnvironmentDetails.getGcpDetails().getResourceEncryptionEnabled());
}
Aggregations