use of com.sequenceiq.freeipa.entity.Template in project cloudbreak by hortonworks.
the class DefaultInstanceGroupProviderTest method createDefaultTemplateTestDefaultVolumeEncryptionAddedWhenAwsCustomEncryptionKeyIsAbsent.
@Test
void createDefaultTemplateTestDefaultVolumeEncryptionAddedWhenAwsCustomEncryptionKeyIsAbsent() {
Template result = underTest.createDefaultTemplate(CloudPlatform.AWS, ACCOUNT_ID, null, null, null);
assertThat(result).isNotNull();
Json attributes = result.getAttributes();
assertThat(attributes).isNotNull();
assertThat(attributes.<Object>getValue(AwsInstanceTemplate.EBS_ENCRYPTION_ENABLED)).isEqualTo(Boolean.TRUE);
assertThat(attributes.<Object>getValue(InstanceTemplate.VOLUME_ENCRYPTION_KEY_TYPE)).isEqualTo(EncryptionType.DEFAULT.name());
}
use of com.sequenceiq.freeipa.entity.Template in project cloudbreak by hortonworks.
the class DefaultInstanceGroupProviderTest method createDefaultTemplateTestCustomVolumeEncryptionWhenEncryptionIsPresent.
@Test
void createDefaultTemplateTestCustomVolumeEncryptionWhenEncryptionIsPresent() {
Template result = underTest.createDefaultTemplate(CloudPlatform.AWS, ACCOUNT_ID, null, null, "dummyAwsEncryptionKey");
assertThat(result).isNotNull();
Json attributes = result.getAttributes();
assertThat(attributes).isNotNull();
assertThat(attributes.<Object>getValue(AwsInstanceTemplate.EBS_ENCRYPTION_ENABLED)).isEqualTo(Boolean.TRUE);
assertThat(attributes.<Object>getValue(InstanceTemplate.VOLUME_ENCRYPTION_KEY_TYPE)).isEqualTo(EncryptionType.CUSTOM.name());
}
use of com.sequenceiq.freeipa.entity.Template in project cloudbreak by hortonworks.
the class DefaultInstanceGroupProviderTest method createDefaultTemplateTestNoVolumeEncryptionWhenAzure.
@Test
void createDefaultTemplateTestNoVolumeEncryptionWhenAzure() {
Template result = underTest.createDefaultTemplate(CloudPlatform.AZURE, ACCOUNT_ID, null, null, null);
assertThat(result).isNotNull();
assertThat(result.getAttributes()).isNull();
}
use of com.sequenceiq.freeipa.entity.Template in project cloudbreak by hortonworks.
the class DefaultInstanceGroupProviderTest method createDefaultTemplateTestVolumeEncryptionAddedWhenAzure.
@Test
void createDefaultTemplateTestVolumeEncryptionAddedWhenAzure() {
Template result = underTest.createDefaultTemplate(CloudPlatform.AZURE, ACCOUNT_ID, "dummyDiskEncryptionSet", null, null);
assertThat(result).isNotNull();
Json attributes = result.getAttributes();
assertThat(attributes).isNotNull();
assertThat(attributes.<Object>getValue(AzureInstanceTemplate.DISK_ENCRYPTION_SET_ID)).isEqualTo("dummyDiskEncryptionSet");
assertThat(attributes.<Object>getValue(AzureInstanceTemplate.MANAGED_DISK_ENCRYPTION_WITH_CUSTOM_KEY_ENABLED)).isEqualTo(Boolean.TRUE);
}
Aggregations