Skip to content

Commit

Permalink
CLOUD-2821 fix http.nonProxyHosts escaping for amq
Browse files Browse the repository at this point in the history
Signed-off-by: rcernich <[email protected]>
  • Loading branch information
rcernich committed Oct 8, 2018
1 parent 91d0095 commit c3fd77a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions os-amq-launch/added/drain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ fi
# Add proxy command line options
source /opt/run-java/proxy-options
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $(proxy_options)"
opts_array=($ACTIVEMQ_OPTS)
ACTIVEMQ_OPTS=$(printf "%q " ${opts_array[@]})

function runMigration() {
export ACTIVEMQ_DATA="$1"
Expand Down
6 changes: 3 additions & 3 deletions os-amq-launch/added/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ fi

# Add proxy command line options
source /opt/run-java/proxy-options
options="$(proxy_options)"
options="$(echo $options | sed 's|"|\\"|g')"
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $options"
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $(proxy_options)"
opts_array=($ACTIVEMQ_OPTS)
ACTIVEMQ_OPTS=$(printf "%q " ${opts_array[@]})

# Add jolokia command line options
cat <<EOF > $AMQ_HOME/bin/env
Expand Down
7 changes: 4 additions & 3 deletions tests/features/amq/amq-common.feature
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,11 @@ Feature: Openshift AMQ tests

Scenario: check nonHttpProxy escaping
When container is started with env
| variable | value |
| NO_PROXY | patriots.com |
| variable | value |
| NO_PROXY | patriots.com,127.* |
Then container log should contain INFO | Apache ActiveMQ 5.11.0.redhat-
And file /opt/amq/bin/env should contain -Dhttp.nonProxyHosts=patriots.com
And container log should contain -Dhttp.nonProxyHosts=patriots.com|127.*
And file /opt/amq/bin/env should contain -Dhttp.nonProxyHosts=patriots.com\|127.\*

Scenario: check queue memory limit
Given XML namespace amq:http://activemq.apache.org/schema/core
Expand Down

0 comments on commit c3fd77a

Please sign in to comment.