use of com.sequenceiq.sdx.api.model.SdxCloudStorageRequest in project cloudbreak by hortonworks.
the class StorageValidationServiceTest method whenAzureNotEvenConfiguredWithManagedIdentityShouldNotThrowException.
@Test
public void whenAzureNotEvenConfiguredWithManagedIdentityShouldNotThrowException() {
SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest();
cloudStorageRequest.setBaseLocation("abfs://example-path");
cloudStorageRequest.setFileSystemType(FileSystemType.ADLS_GEN_2);
cloudStorageRequest.setAdlsGen2(null);
Assertions.assertThrows(BadRequestException.class, () -> underTest.validateCloudStorage("AZURE", cloudStorageRequest));
}
use of com.sequenceiq.sdx.api.model.SdxCloudStorageRequest in project cloudbreak by hortonworks.
the class StorageValidationServiceTest method whenGcsNotEvenConfiguredWithServiceAccountShouldNotThrowException.
@Test
public void whenGcsNotEvenConfiguredWithServiceAccountShouldNotThrowException() {
SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest();
cloudStorageRequest.setBaseLocation("gs://example-path");
cloudStorageRequest.setFileSystemType(FileSystemType.GCS);
cloudStorageRequest.setGcs(null);
Assertions.assertThrows(BadRequestException.class, () -> underTest.validateCloudStorage("GCP", cloudStorageRequest));
}
use of com.sequenceiq.sdx.api.model.SdxCloudStorageRequest in project cloudbreak by hortonworks.
the class StorageValidationServiceTest method whenAzureConfiguredWithoutManagedIdentityShouldThrowException.
@Test
public void whenAzureConfiguredWithoutManagedIdentityShouldThrowException() {
SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest();
cloudStorageRequest.setBaseLocation("abfs://example-path");
cloudStorageRequest.setFileSystemType(FileSystemType.ADLS_GEN_2);
AdlsGen2CloudStorageV1Parameters adlsGen2 = new AdlsGen2CloudStorageV1Parameters();
adlsGen2.setManagedIdentity(null);
cloudStorageRequest.setAdlsGen2(adlsGen2);
Assertions.assertThrows(BadRequestException.class, () -> underTest.validateCloudStorage("AZURE", cloudStorageRequest));
}
use of com.sequenceiq.sdx.api.model.SdxCloudStorageRequest in project cloudbreak by hortonworks.
the class StorageValidationServiceTest method whenAwsNotEvenConfiguredWithRoleShouldNotThrowException.
@Test
public void whenAwsNotEvenConfiguredWithRoleShouldNotThrowException() {
SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest();
cloudStorageRequest.setBaseLocation("s3a://example-path");
cloudStorageRequest.setFileSystemType(FileSystemType.S3);
cloudStorageRequest.setS3(null);
Assertions.assertThrows(BadRequestException.class, () -> underTest.validateCloudStorage("AWS", cloudStorageRequest));
}
use of com.sequenceiq.sdx.api.model.SdxCloudStorageRequest in project cloudbreak by hortonworks.
the class StorageValidationServiceTest method whenGcsConfiguredWithServiceAccountShouldNotThrowException.
@Test
public void whenGcsConfiguredWithServiceAccountShouldNotThrowException() {
SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest();
cloudStorageRequest.setBaseLocation("gs://example-path");
cloudStorageRequest.setFileSystemType(FileSystemType.GCS);
GcsCloudStorageV1Parameters gcs = new GcsCloudStorageV1Parameters();
gcs.setServiceAccountEmail("mail");
cloudStorageRequest.setGcs(gcs);
underTest.validateCloudStorage("GCP", cloudStorageRequest);
}
Aggregations