use of hudson.tools.InstallSourceProperty in project configuration-as-code-plugin by jenkinsci.
the class CustomToolsTest method configure_custom_tools.
@Test
@Issue("#97")
@Ignore
@ConfiguredWithCode(value = "CustomToolsTest.yml")
public void configure_custom_tools() {
DescriptorImpl descriptor = (DescriptorImpl) j.jenkins.getDescriptorOrDie(CustomTool.class);
assertEquals(1, descriptor.getInstallations().length);
final CustomTool customTool = descriptor.getInstallations()[0];
final InstallSourceProperty source = customTool.getProperties().get(InstallSourceProperty.class);
assertNotNull(source);
final CommandInstaller installer = source.installers.get(CommandInstaller.class);
assertNotNull(installer);
assertEquals("/bin/my-tool", installer.getToolHome());
}
use of hudson.tools.InstallSourceProperty in project configuration-as-code-plugin by jenkinsci.
the class MavenConfiguratorTest method configure_maven_tool.
@Test
@ConfiguredWithReadme("maven/README.md#0")
public void configure_maven_tool() {
final Maven.DescriptorImpl descriptor = ExtensionList.lookupSingleton(Maven.DescriptorImpl.class);
assertEquals(1, descriptor.getInstallations().length);
Maven.MavenInstallation maven = descriptor.getInstallations()[0];
assertEquals("maven3", maven.getName());
assertEquals("/maven3", maven.getHome());
InstallSourceProperty installSourceProperty = maven.getProperties().get(InstallSourceProperty.class);
assertEquals(1, installSourceProperty.installers.size());
MavenInstaller installer = installSourceProperty.installers.get(MavenInstaller.class);
assertEquals("3.8.4", installer.id);
}
use of hudson.tools.InstallSourceProperty in project configuration-as-code-plugin by jenkinsci.
the class SbtTest method configure_sbt_tool.
@Test
public void configure_sbt_tool() {
final SbtPluginBuilder.DescriptorImpl descriptor = ExtensionList.lookupSingleton(SbtPluginBuilder.DescriptorImpl.class);
assertEquals(1, descriptor.getInstallations().length);
SbtInstallation sbt = descriptor.getInstallations()[0];
assertEquals("sbt", sbt.getName());
assertEquals("/usr/bin/sbt", sbt.getHome());
InstallSourceProperty installSourceProperty = sbt.getProperties().get(InstallSourceProperty.class);
assertEquals(1, installSourceProperty.installers.size());
SbtInstaller installer = installSourceProperty.installers.get(SbtInstaller.class);
assertEquals("1.2.8", installer.id);
}
use of hudson.tools.InstallSourceProperty in project configuration-as-code-plugin by jenkinsci.
the class NodeJSTest method configure_nodejs.
@Test
@ConfiguredWithReadme("nodejs/README.md")
public void configure_nodejs() {
final NodeJSInstallation.DescriptorImpl descriptor = ExtensionList.lookupSingleton(NodeJSInstallation.DescriptorImpl.class);
assertEquals(1, descriptor.getInstallations().length);
final NodeJSInstallation nodejs = descriptor.getInstallations()[0];
final InstallSourceProperty installSourceProperty = nodejs.getProperties().get(InstallSourceProperty.class);
final NodeJSInstaller nodeJSInstaller = installSourceProperty.installers.get(NodeJSInstaller.class);
assertEquals("12.11.1", nodeJSInstaller.id);
assertEquals(48, nodeJSInstaller.getNpmPackagesRefreshHours().longValue());
}
use of hudson.tools.InstallSourceProperty in project configuration-as-code-plugin by jenkinsci.
the class TerraformTest method configure_terraform_tool.
@Test
public void configure_terraform_tool() {
final TerraformInstallation.DescriptorImpl descriptor = ExtensionList.lookupSingleton(TerraformInstallation.DescriptorImpl.class);
assertEquals(1, descriptor.getInstallations().length);
TerraformInstallation terraform = descriptor.getInstallations()[0];
assertEquals("terraform", terraform.getName());
assertEquals("/terraform-0.11", terraform.getHome());
InstallSourceProperty installSourceProperty = terraform.getProperties().get(InstallSourceProperty.class);
assertEquals(1, installSourceProperty.installers.size());
TerraformInstaller installer = installSourceProperty.installers.get(TerraformInstaller.class);
assertEquals("0.11.9-linux-amd64", installer.id);
}
Aggregations