Search in sources :

Example 1 with TerraformInstaller

use of org.jenkinsci.plugins.terraform.TerraformInstaller 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);
}
Also used : InstallSourceProperty(hudson.tools.InstallSourceProperty) TerraformInstallation(org.jenkinsci.plugins.terraform.TerraformInstallation) TerraformInstaller(org.jenkinsci.plugins.terraform.TerraformInstaller) Test(org.junit.Test)

Aggregations

InstallSourceProperty (hudson.tools.InstallSourceProperty)1 TerraformInstallation (org.jenkinsci.plugins.terraform.TerraformInstallation)1 TerraformInstaller (org.jenkinsci.plugins.terraform.TerraformInstaller)1 Test (org.junit.Test)1