Search in sources :

Example 11 with StorageLocation

use of com.sequenceiq.cloudbreak.domain.cloudstorage.StorageLocation in project cloudbreak by hortonworks.

the class RemoteDataContextWorkaroundServiceTest method testFileSystemWhenHivePathNotPresentedInDistroXButSdxDoesContainsItShouldReturnWithSdxConfigs.

@Test
public void testFileSystemWhenHivePathNotPresentedInDistroXButSdxDoesContainsItShouldReturnWithSdxConfigs() throws IOException {
    when(nameGenerator.generateName(APIResourceType.FILESYSTEM)).thenReturn("appletree");
    FileSystem fileSystem = underTest.prepareFilesytem(mockRequestedCluster(mockRds(HIVE)), mockStack(mockStorageLocation(1), mockStorageLocation(2)));
    List<StorageLocation> locations = fileSystem.getCloudStorage().getLocations();
    Assert.assertEquals(2, locations.size());
    Assert.assertTrue(hasPropretyWithIndex(locations, 1));
    Assert.assertTrue(hasPropretyWithIndex(locations, 2));
}
Also used : FileSystem(com.sequenceiq.cloudbreak.domain.FileSystem) StorageLocation(com.sequenceiq.cloudbreak.domain.cloudstorage.StorageLocation) Test(org.junit.Test)

Aggregations

StorageLocation (com.sequenceiq.cloudbreak.domain.cloudstorage.StorageLocation)11 FileSystem (com.sequenceiq.cloudbreak.domain.FileSystem)8 CloudStorage (com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage)5 Test (org.junit.Test)4 CloudIdentity (com.sequenceiq.cloudbreak.domain.cloudstorage.CloudIdentity)3 SpiFileSystem (com.sequenceiq.cloudbreak.cloud.model.SpiFileSystem)2 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)2 AccountMapping (com.sequenceiq.cloudbreak.domain.cloudstorage.AccountMapping)2 ArrayList (java.util.ArrayList)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 CloudFileSystemView (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudFileSystemView)1 CloudS3View (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)1 CloudEfsConfiguration (com.sequenceiq.cloudbreak.cloud.model.filesystem.efs.CloudEfsConfiguration)1 CloudStorageConfigurationFailedException (com.sequenceiq.cloudbreak.cm.exception.CloudStorageConfigurationFailedException)1 MissingResourceNameGenerator (com.sequenceiq.cloudbreak.common.converter.MissingResourceNameGenerator)1 Json (com.sequenceiq.cloudbreak.common.json.Json)1 JsonUtil (com.sequenceiq.cloudbreak.common.json.JsonUtil)1 FILESYSTEM (com.sequenceiq.cloudbreak.common.type.APIResourceType.FILESYSTEM)1 AdlsGen2Identity (com.sequenceiq.cloudbreak.domain.cloudstorage.AdlsGen2Identity)1 EfsIdentity (com.sequenceiq.cloudbreak.domain.cloudstorage.EfsIdentity)1