Skip to content

Commit

Permalink
[CONSUL-439] Parse nc Command in function (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
joselo85 committed Dec 21, 2022
1 parent bbae5a9 commit e0d981a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test/integration/connect/envoy/helpers.windows.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

MOD_ARG=""

function split_hostport {
local HOSTPORT="$@"

if [[ $HOSTPORT == *":"* ]]
then
MOD_ARG=$( <<< $HOSTPORT sed 's/:/ /' )
fi
}

# retry based on
# https://github.com/fernandoacorreia/azure-docker-registry/blob/master/tools/scripts/create-registry-server
# under MIT license.
Expand All @@ -18,7 +29,11 @@ function retry {
fi

if [[ $1 == "curl" ]]; then
set -- ${@} -m 10
set -- "${@}" -m 10
elif [[ $1 == "nc" ]]
then
split_hostport $3
set -- "${@:1:2}" $MOD_ARG "${@:4}"
fi

# This if block, was added to check if curl is being executed directly on a test,
Expand Down

0 comments on commit e0d981a

Please sign in to comment.