Search in sources :

Example 6 with FileSystemConfiguration

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

the class AbstractFileSystemConfiguratorTest method testCreateResource.

@Test
public void testCreateResource() {
    FileSystemConfiguration fsConfig = new FileSystemConfiguration();
    Map<String, String> actual = underTest.createResources(fsConfig);
    Assert.assertEquals(emptyMap(), actual);
}
Also used : FileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.FileSystemConfiguration) Test(org.junit.Test)

Example 7 with FileSystemConfiguration

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

the class FileSystemViewTest method testWasbFileSystemConfiguration.

@Test
public void testWasbFileSystemConfiguration() {
    FileSystemConfiguration fileSystemConfiguration = TestUtil.wasbFileSystemConfiguration();
    FileSystemView fileSystemView = new FileSystemView(fileSystemConfiguration);
    Assert.assertNotNull(fileSystemView);
    Assert.assertEquals(2, fileSystemView.getProperties().size());
}
Also used : FileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.FileSystemConfiguration) Test(org.junit.Test)

Example 8 with FileSystemConfiguration

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

the class AbstractFileSystemConfiguratorTest method testGetScriptsWhenNoReplace.

@Test
public void testGetScriptsWhenNoReplace() {
    Credential credential = new Credential();
    credential.setId(1L);
    FileSystemConfiguration fsConfig = new FileSystemConfiguration();
    List<RecipeScript> actual = underTest.getScripts(credential, fsConfig);
    List<RecipeScript> expected = singletonList(new RecipeScript("echo '$replace'", ExecutionType.ALL_NODES, RecipeType.POST_AMBARI_START));
    Assert.assertEquals(expected, actual);
}
Also used : Credential(com.sequenceiq.cloudbreak.domain.Credential) RecipeScript(com.sequenceiq.cloudbreak.common.model.recipe.RecipeScript) FileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.FileSystemConfiguration) Test(org.junit.Test)

Example 9 with FileSystemConfiguration

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

the class AbstractFileSystemConfiguratorTest method testGetScriptsWhenFileNotFound.

@Test
public void testGetScriptsWhenFileNotFound() {
    Credential credential = new Credential();
    credential.setId(2L);
    FileSystemConfiguration fsConfig = new FileSystemConfiguration();
    thrown.expectMessage("Filesystem configuration scripts cannot be read.");
    thrown.expect(FileSystemConfigException.class);
    underTest.getScripts(credential, fsConfig);
}
Also used : Credential(com.sequenceiq.cloudbreak.domain.Credential) FileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.FileSystemConfiguration) Test(org.junit.Test)

Example 10 with FileSystemConfiguration

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

the class FileSystemViewTest method testAdlsFileSystemConfiguration.

@Test
public void testAdlsFileSystemConfiguration() {
    FileSystemConfiguration fileSystemConfiguration = TestUtil.adlsFileSystemConfiguration();
    FileSystemView fileSystemView = new FileSystemView(fileSystemConfiguration);
    Assert.assertNotNull(fileSystemView);
    Assert.assertEquals(4, fileSystemView.getProperties().size());
}
Also used : FileSystemConfiguration(com.sequenceiq.cloudbreak.api.model.FileSystemConfiguration) Test(org.junit.Test)

Aggregations

FileSystemConfiguration (com.sequenceiq.cloudbreak.api.model.FileSystemConfiguration)15 Test (org.junit.Test)10 RecipeScript (com.sequenceiq.cloudbreak.common.model.recipe.RecipeScript)3 Credential (com.sequenceiq.cloudbreak.domain.Credential)3 FileSystemType (com.sequenceiq.cloudbreak.api.model.FileSystemType)2 FileSystemConfigurator (com.sequenceiq.cloudbreak.blueprint.filesystem.FileSystemConfigurator)2 BlueprintConfigurationEntry (com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry)1 FileSystemConfigurationView (com.sequenceiq.cloudbreak.blueprint.template.views.FileSystemConfigurationView)1 FileSystem (com.sequenceiq.cloudbreak.domain.FileSystem)1 HostGroup (com.sequenceiq.cloudbreak.domain.HostGroup)1 Recipe (com.sequenceiq.cloudbreak.domain.Recipe)1 TerminationFailedException (com.sequenceiq.cloudbreak.service.stack.flow.TerminationFailedException)1 JsonUtil.writeValueAsString (com.sequenceiq.cloudbreak.util.JsonUtil.writeValueAsString)1 IOException (java.io.IOException)1