Search in sources :

Example 1 with DescriptorImpl

use of com.cloudbees.jenkins.plugins.customtools.CustomTool.DescriptorImpl 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());
}
Also used : CustomTool(com.cloudbees.jenkins.plugins.customtools.CustomTool) DescriptorImpl(com.cloudbees.jenkins.plugins.customtools.CustomTool.DescriptorImpl) CommandInstaller(hudson.tools.CommandInstaller) InstallSourceProperty(hudson.tools.InstallSourceProperty) Ignore(org.junit.Ignore) Issue(org.jvnet.hudson.test.Issue) Test(org.junit.Test) ConfiguredWithCode(io.jenkins.plugins.casc.misc.ConfiguredWithCode)

Aggregations

CustomTool (com.cloudbees.jenkins.plugins.customtools.CustomTool)1 DescriptorImpl (com.cloudbees.jenkins.plugins.customtools.CustomTool.DescriptorImpl)1 CommandInstaller (hudson.tools.CommandInstaller)1 InstallSourceProperty (hudson.tools.InstallSourceProperty)1 ConfiguredWithCode (io.jenkins.plugins.casc.misc.ConfiguredWithCode)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 Issue (org.jvnet.hudson.test.Issue)1