Search in sources :

Example 1 with WasbFileSystemConfiguration

use of com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration in project cloudbreak by hortonworks.

the class WasbFileSystemConfiguratorTest method testGetDefaultFsValueWhenNotSecure.

@Test
public void testGetDefaultFsValueWhenNotSecure() {
    WasbFileSystemConfiguration config = new WasbFileSystemConfiguration();
    config.setSecure(false);
    config.setAccountName("accountName");
    config.addProperty("container", "container");
    String actual = underTest.getDefaultFsValue(config);
    String expected = "wasb://container@accountName.blob.core.windows.net";
    Assert.assertEquals(expected, actual);
}
Also used : WasbFileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration) Test(org.junit.Test)

Example 2 with WasbFileSystemConfiguration

use of com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration in project cloudbreak by hortonworks.

the class WasbFileSystemConfiguratorTest method testGetDefaultFsValueWhenSecure.

@Test
public void testGetDefaultFsValueWhenSecure() {
    WasbFileSystemConfiguration config = new WasbFileSystemConfiguration();
    config.setSecure(true);
    config.setAccountName("accountName");
    config.addProperty("container", "container");
    String actual = underTest.getDefaultFsValue(config);
    String expected = "wasbs://container@accountName.blob.core.windows.net";
    Assert.assertEquals(expected, actual);
}
Also used : WasbFileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration) Test(org.junit.Test)

Example 3 with WasbFileSystemConfiguration

use of com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration in project cloudbreak by hortonworks.

the class WasbFileSystemConfiguratorTest method testGetFsProperties.

@Test
public void testGetFsProperties() {
    WasbFileSystemConfiguration config = new WasbFileSystemConfiguration();
    config.setAccountName("accountName");
    config.setAccountKey("accountKey");
    List<BlueprintConfigurationEntry> actual = underTest.getFsProperties(config, null);
    List<BlueprintConfigurationEntry> expected = Arrays.asList(new BlueprintConfigurationEntry("core-site", "fs.AbstractFileSystem.wasbs.impl", "org.apache.hadoop.fs.azure.Wasbs"), new BlueprintConfigurationEntry("core-site", "fs.AbstractFileSystem.wasb.impl", "org.apache.hadoop.fs.azure.Wasb"), new BlueprintConfigurationEntry("core-site", "fs.azure.account.key.accountName.blob.core.windows.net", "accountKey"), new BlueprintConfigurationEntry("core-site", "fs.azure.selfthrottling.read.factor", "1.0"), new BlueprintConfigurationEntry("core-site", "fs.azure.selfthrottling.write.factor", "1.0"));
    Assert.assertEquals(expected, actual);
}
Also used : WasbFileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration) BlueprintConfigurationEntry(com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry) Test(org.junit.Test)

Example 4 with WasbFileSystemConfiguration

use of com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration in project cloudbreak by hortonworks.

the class WasbFileSystemConfiguratorTest method testGetScriptConfigs.

@Test
public void testGetScriptConfigs() {
    List<FileSystemScriptConfig> actual = underTest.getScriptConfigs(new Credential(), new WasbFileSystemConfiguration());
    Assert.assertEquals(emptyList(), actual);
}
Also used : FileSystemScriptConfig(com.sequenceiq.cloudbreak.blueprint.filesystem.FileSystemScriptConfig) Credential(com.sequenceiq.cloudbreak.domain.Credential) WasbFileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration) Test(org.junit.Test)

Example 5 with WasbFileSystemConfiguration

use of com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration in project cloudbreak by hortonworks.

the class TestUtil method wasbFileSystemConfiguration.

public static FileSystemConfiguration wasbFileSystemConfiguration() {
    WasbFileSystemConfiguration wasbFileSystemConfiguration = new WasbFileSystemConfiguration();
    wasbFileSystemConfiguration.setAccountKey("accountkey");
    wasbFileSystemConfiguration.setAccountName("accountname");
    wasbFileSystemConfiguration.setSecure(true);
    return wasbFileSystemConfiguration;
}
Also used : WasbFileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration)

Aggregations

WasbFileSystemConfiguration (com.sequenceiq.cloudbreak.api.model.WasbFileSystemConfiguration)5 Test (org.junit.Test)4 BlueprintConfigurationEntry (com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry)1 FileSystemScriptConfig (com.sequenceiq.cloudbreak.blueprint.filesystem.FileSystemScriptConfig)1 Credential (com.sequenceiq.cloudbreak.domain.Credential)1