Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[FIXED JENKINS-24243] respecting nonProxySettings
* moved proxy configuration to MavenRepositorySystemSession creation * added intellijfile to gitignore
- Loading branch information
Showing
with
74 additions
and 8 deletions.
@@ -0,0 +1,36 @@ | ||
package org.jvnet.hudson.plugins.repositoryconnector.aether; | ||
|
||
import hudson.model.Cause; | ||
import hudson.model.FreeStyleProject; | ||
import hudson.model.Result; | ||
import hudson.tasks.Shell; | ||
import org.apache.commons.io.FileUtils; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.jvnet.hudson.plugins.repositoryconnector.Artifact; | ||
import org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver; | ||
|
||
import java.io.File; | ||
import java.io.PrintStream; | ||
import java.util.Collections; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class AetherTest { | ||
|
||
private Aether sut; | ||
|
||
@Before | ||
public void setup() | ||
{ | ||
sut = new Aether( new File("jenkinstest"), System.out, false ); | ||
} | ||
|
||
@Test | ||
public void convertGivenNonHttpProxySettings() throws Exception { | ||
|
||
String result = sut.convertHudsonNonProxyToJavaNonProxy("localhost\n*.google.com\n\napple.com"); | ||
|
||
assertEquals("New lines should be replaced", result, "localhost|*.google.com|apple.com"); | ||
} | ||
} |