Skip to content

Commit

Permalink
Update run-serve-tests.sh to run "make test-int-serve-darwin-amd64" o…
Browse files Browse the repository at this point in the history
…n macOS (#831)
  • Loading branch information
matsuo authored Aug 12, 2023
1 parent a435dbf commit 2e27ed3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion integration-tests/run-serve-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ find_open_port() {
# ss (see unix implementation below) doesn't exist on Windows, so fall back on just choosing a random number inside the range (since netstat is _slow_).
# Thanks also to https://blog.netspi.com/15-ways-to-bypass-the-powershell-execution-policy/
powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "integration-tests/Find-AvailablePort.ps1 -startAt ${startAt} -endAt ${endAt}"
elif [[ "$(go env GOOS)" == "darwin" ]]; then
jot -n -r 1 1025 65535
else
# Thanks to https://unix.stackexchange.com/questions/55913/whats-the-easiest-way-to-find-an-unused-local-port
comm -23 \
Expand Down Expand Up @@ -58,9 +60,10 @@ args=(
"serve"
"--listen-addr=127.0.0.1:${open_port}"
)
log_action -e "\nTesting \`${GOSS_BINARY} ${args[*]}\` ...\n"
log_action "\nTesting \`${GOSS_BINARY} ${args[*]}\` ...\n"
"${GOSS_BINARY}" "${args[@]}" &
base_url="http://127.0.0.1:${open_port}"
[[ "$(go env GOOS)" == "darwin" ]] && sleep 2

assert_response_contains() {
local url="${1:?"1st arg: url"}"
Expand Down

0 comments on commit 2e27ed3

Please sign in to comment.