Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions kokoro/scripts/test/go_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ if [[ -n "${PLATFORMS:-}" ]]; then
IMAGE_SPECS="${PLATFORMS}"
fi

# TODO(b/502589964): force test VMs to run in the same zone as the kokoro worker.
# The worker is not guaranteed to run in a zone where ARM machines are available,
# so don't do this for ARM tests.
if [[ "${ARCH:-}" != "aarch64" ]]; then
ZONE_METADATA=$(curl -s -H "Metadata-Flavor: Google" http://169.254.169.254/computeMetadata/v1/instance/zone)
if [[ $? -eq 0 ]] && [[ -n "$ZONE_METADATA" ]]; then
ZONE_METADATA="${ZONE_METADATA%/}"
export ZONES="${ZONE_METADATA##*/}"
fi
fi

set_image_specs
set_zones

Expand Down
Loading