Search in sources :

Example 11 with HttpProxyConfig

use of org.apache.drill.exec.store.http.util.HttpProxyConfig in project drill by apache.

the class TestHttpProxy method testURL.

@Test
public void testURL() {
    // See https://www.shellhacks.com/linux-proxy-server-settings-set-proxy-command-line/
    HttpProxyConfig proxy = HttpProxyConfig.builder().url("http://bob:secret@foo.com:1234").build();
    assertEquals(ProxyType.HTTP, proxy.type);
    assertEquals("foo.com", proxy.host);
    assertEquals(1234, proxy.port);
    assertEquals("bob", proxy.username);
    assertEquals("secret", proxy.password);
}
Also used : HttpProxyConfig(org.apache.drill.exec.store.http.util.HttpProxyConfig) BaseTest(org.apache.drill.test.BaseTest) Test(org.junit.Test)

Aggregations

HttpProxyConfig (org.apache.drill.exec.store.http.util.HttpProxyConfig)11 BaseTest (org.apache.drill.test.BaseTest)10 Test (org.junit.Test)10 Config (com.typesafe.config.Config)4 ConfigBuilder (org.apache.drill.test.ConfigBuilder)4