use of hudson.EnvVars in project pipeline-aws-plugin by jenkinsci.
the class WithAWSStepTest method testSettingEndpointUrl.
@Test
public void testSettingEndpointUrl() throws Exception {
final EnvVars envVars = new EnvVars();
envVars.put(AWSClientFactory.AWS_ENDPOINT_URL, "https://minio.mycompany.com");
envVars.put(AWSClientFactory.AWS_REGION, Regions.DEFAULT_REGION.getName());
final AmazonS3ClientBuilder amazonS3ClientBuilder = AWSClientFactory.configureBuilder(AmazonS3ClientBuilder.standard(), envVars);
Assert.assertEquals("https://minio.mycompany.com", amazonS3ClientBuilder.getEndpoint().getServiceEndpoint());
}
use of hudson.EnvVars in project pipeline-aws-plugin by jenkinsci.
the class ProxyTest method shouldParseProxyLowerCase.
@Test
public void shouldParseProxyLowerCase() throws Exception {
EnvVars vars = new EnvVars();
vars.put(ProxyConfiguration.HTTPS_PROXY_LC, "http://127.0.0.1:8888/");
ClientConfiguration config = new ClientConfiguration();
config.setProtocol(Protocol.HTTPS);
ProxyConfiguration.configure(vars, config);
Assert.assertNull(config.getProxyUsername());
Assert.assertNull(config.getProxyPassword());
Assert.assertEquals("127.0.0.1", config.getProxyHost());
Assert.assertEquals(8888, config.getProxyPort());
}
use of hudson.EnvVars in project pipeline-aws-plugin by jenkinsci.
the class ProxyTest method shouldSetNonProxyHosts.
@Test
public void shouldSetNonProxyHosts() throws Exception {
EnvVars vars = new EnvVars();
vars.put(ProxyConfiguration.NO_PROXY, "127.0.0.1,localhost");
vars.put(ProxyConfiguration.HTTPS_PROXY, "http://127.0.0.1:8888/");
ClientConfiguration config = new ClientConfiguration();
config.setProtocol(Protocol.HTTPS);
ProxyConfiguration.configure(vars, config);
Assert.assertEquals("127.0.0.1|localhost", config.getNonProxyHosts());
}
use of hudson.EnvVars in project pipeline-aws-plugin by jenkinsci.
the class ProxyTest method shouldSetNonProxyHostsLowerCase.
@Test
public void shouldSetNonProxyHostsLowerCase() throws Exception {
EnvVars vars = new EnvVars();
vars.put(ProxyConfiguration.NO_PROXY_LC, "127.0.0.1,localhost");
vars.put(ProxyConfiguration.HTTPS_PROXY, "http://127.0.0.1:8888/");
ClientConfiguration config = new ClientConfiguration();
config.setProtocol(Protocol.HTTPS);
ProxyConfiguration.configure(vars, config);
Assert.assertEquals("127.0.0.1|localhost", config.getNonProxyHosts());
}
use of hudson.EnvVars in project pipeline-aws-plugin by jenkinsci.
the class ProxyTest method shouldParseProxyWithoutPort.
@Test
public void shouldParseProxyWithoutPort() throws Exception {
EnvVars vars = new EnvVars();
vars.put(ProxyConfiguration.HTTPS_PROXY, "http://127.0.0.1/");
ClientConfiguration config = new ClientConfiguration();
config.setProtocol(Protocol.HTTPS);
ProxyConfiguration.configure(vars, config);
Assert.assertNull(config.getProxyUsername());
Assert.assertNull(config.getProxyPassword());
Assert.assertEquals("127.0.0.1", config.getProxyHost());
Assert.assertEquals(443, config.getProxyPort());
}
Aggregations