Search in sources :

Example 1 with AdoptOpenJDKInstaller

use of io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller in project configuration-as-code-plugin by jenkinsci.

the class JdkConfiguratorTest method configure_jdk_tool.

@Test
public void configure_jdk_tool() {
    final JDK.DescriptorImpl descriptor = ExtensionList.lookupSingleton(JDK.DescriptorImpl.class);
    assertEquals(1, descriptor.getInstallations().length);
    JDK jdk = descriptor.getInstallations()[0];
    assertEquals("jdk11", jdk.getName());
    assertEquals("/jdk", jdk.getHome());
    InstallSourceProperty installSourceProperty = jdk.getProperties().get(InstallSourceProperty.class);
    assertEquals(1, installSourceProperty.installers.size());
    AdoptOpenJDKInstaller installer = installSourceProperty.installers.get(AdoptOpenJDKInstaller.class);
    assertEquals("jdk-11.0.14+9", installer.id);
}
Also used : JDK(hudson.model.JDK) AdoptOpenJDKInstaller(io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller) InstallSourceProperty(hudson.tools.InstallSourceProperty) Test(org.junit.Test)

Aggregations

JDK (hudson.model.JDK)1 InstallSourceProperty (hudson.tools.InstallSourceProperty)1 AdoptOpenJDKInstaller (io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller)1 Test (org.junit.Test)1