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);
}
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);
}
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);
}
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);
}
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;
}
Aggregations