Skip to content

Commit

Permalink
test: switch envoy integration tests to use pgrep+kill instead of ps+…
Browse files Browse the repository at this point in the history
…grep+awk+kill
  • Loading branch information
rboyer committed Apr 23, 2021
1 parent b67d65b commit ce361b6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/integration/connect/envoy/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,9 @@ function docker_consul_exec {
function get_envoy_pid {
local BOOTSTRAP_NAME=$1
local DC=${2:-primary}
run ps aux
run pgrep -f "envoy -c /workdir/$DC/envoy/${BOOTSTRAP_NAME}-bootstrap.json"
[ "$status" == 0 ]
echo "$output" 1>&2
PID="$(echo "$output" | grep "envoy -c /workdir/$DC/envoy/${BOOTSTRAP_NAME}-bootstrap.json" | awk '{print $1}')"
[ -n "$PID" ]

echo "$PID"
echo "$output"
}

function kill_envoy {
Expand Down

0 comments on commit ce361b6

Please sign in to comment.