Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JENKINS-50293 Repository Connector Plugin does not use Jenkins config…
…ured proxy correctly (#33)
- Loading branch information
Showing
2 changed files
with
11 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 3 additions & 12 deletions
15
src/test/java/org/jvnet/hudson/plugins/repositoryconnector/aether/AetherTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
package org.jvnet.hudson.plugins.repositoryconnector.aether; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import java.io.File; | ||
|
||
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"); | ||
String result = Aether.convertHudsonNonProxyToJavaNonProxy("localhost\n*.google.com\n\napple.com"); | ||
|
||
assertEquals("New lines should be replaced", result, "localhost|*.google.com|apple.com"); | ||
} | ||
|
||
@Test | ||
public void convertGivenNullNonHttpProxySettings() throws Exception { | ||
assertEquals("New lines should be replaced", sut.convertHudsonNonProxyToJavaNonProxy(null), ""); | ||
assertEquals("New lines should be replaced", Aether.convertHudsonNonProxyToJavaNonProxy(null), ""); | ||
} | ||
|
||
} |