Skip to content

Commit

Permalink
[CONSUL-204] Support Curl on helpers.windows.bash (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
joselo85 committed Dec 21, 2022
1 parent 854c6d1 commit a2e7802
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/integration/connect/envoy/helpers.windows.bash
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ function snapshot_envoy_admin {
local OUTDIR="${LOG_DIR}/envoy-snapshots/${DC}/${ENVOY_NAME}"

mkdir -p "${OUTDIR}"
docker_wget "$DC" "http://${HOSTPORT}/config_dump" -q -O - > "${OUTDIR}/config_dump.json"
docker_wget "$DC" "http://${HOSTPORT}/clusters?format=json" -q -O - > "${OUTDIR}/clusters.json"
docker_wget "$DC" "http://${HOSTPORT}/stats" -q -O - > "${OUTDIR}/stats.txt"
docker_wget "$DC" "http://${HOSTPORT}/stats/prometheus" -q -O - > "${OUTDIR}/stats_prometheus.txt"
docker_wget "$DC" -s "http://${HOSTPORT}/config_dump" > "${OUTDIR}/config_dump.json"
docker_wget "$DC" -s "http://${HOSTPORT}/clusters?format=json" > "${OUTDIR}/clusters.json"
docker_wget "$DC" -s "http://${HOSTPORT}/stats" > "${OUTDIR}/stats.txt"
docker_wget "$DC" -s "http://${HOSTPORT}/stats/prometheus" > "${OUTDIR}/stats_prometheus.txt"
}

function reset_envoy_metrics {
Expand Down Expand Up @@ -562,30 +562,30 @@ function assert_intention_denied {
function docker_consul {
local DC=$1
shift 1
docker run -i --rm --network container:envoy_consul-${DC}_1 consul-dev "$@"
docker.exe run -i --rm --network container:envoy_consul-${DC}_1 consul-dev "$@"
}

function docker_consul_for_proxy_bootstrap {
local DC=$1
shift 1

docker run -i --rm --network container:envoy_consul-${DC}_1 consul-dev "$@"
docker.exe run -i --rm --network container:envoy_consul-${DC}_1 consul-dev "$@"
}

function docker_wget {
local DC=$1
shift 1
docker run --rm --network container:envoy_consul-${DC}_1 docker.mirror.hashicorp.services/alpine:3.9 wget "$@"
docker.exe run --rm --network container:envoy_consul-${DC}_1 docker.mirror.hashicorp.services/windows/nanoserver curl "$@"
}

function docker_curl {
local DC=$1
shift 1
docker run --rm --network container:envoy_consul-${DC}_1 --entrypoint curl consul-dev "$@"
docker.exe run --rm --network container:envoy_consul-${DC}_1 --entrypoint curl consul-dev "$@"
}

function docker_exec {
if ! docker exec -i "$@"
if ! docker.exe exec -i "$@"
then
echo "Failed to execute: docker exec -i $@" 1>&2
return 1
Expand Down

0 comments on commit a2e7802

Please sign in to comment.