Skip to content

Commit

Permalink
ENTESB-10252: removed spaces from noProxy input ENV var
Browse files Browse the repository at this point in the history
  • Loading branch information
valdar committed Feb 28, 2019
1 parent e203d9a commit 1bfb364
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fish-pepper/run-java-sh/fp-files/run-java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ proxy_options() {

local noProxy="${no_proxy:-${NO_PROXY:-}}"
if [ -n "$noProxy" ] ; then
ret="$ret -Dhttp.nonProxyHosts=$(echo "|$noProxy" | sed -e 's/,[[:space:]]*/|/g' | sed -e 's/|\./|\*\./g' | cut -c 2-)"
ret="$ret -Dhttp.nonProxyHosts=$(echo "|$noProxy" | sed -e 's/,[[:space:]]*/|/g' | sed -e 's/[[:space:]]//g' | sed -e 's/|\./|\*\./g' | cut -c 2-)"
fi
echo "$ret"
}
Expand Down
11 changes: 11 additions & 0 deletions test/t/04_proxy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ load test_helper
assert_status 0
}

@test "NO_PROXY setting end to end test with space" {
d=$(mktmpdir "proxy")

cp "$TEST_JAR_DIR/TestProxy.class" "$d/TestProxy.class"
HTTP_PROXY=http://dummy.com HTTPS_PROXY=http://dummy.com NO_PROXY='.redhat.com| .google.com' no_proxy='.redhat.com| .google.com' JAVA_MAIN_CLASS=TestProxy JAVA_APP_DIR=$d run $TEST_SHELL $RUN_JAVA
echo $status
echo $output

assert_status 0
}

@test "All proxy settings" {
d=$(mktmpdir "proxy")
cp "$TEST_JAR_DIR/test.jar" "$d/test.jar"
Expand Down

0 comments on commit 1bfb364

Please sign in to comment.