Skip to content

Commit d17dc13

Browse files
committed
Fix host reuse for e2e tests
This will now filter the hosts in gcloud by project, instance name and zone, to make sure we only reuse the correct hosts. Previously it would try to reuse images outside the selected zone, resulting in a crash. The resulting command will look like this: $ gcloud compute instances list --project="my-project-123" --filter="name:'test-cos-beta-78-12499-16-0' AND zone:'europe-west6-b'"
1 parent 29f23e6 commit d17dc13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hack/make-rules/test-e2e-node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ if [ "${remote}" = true ] ; then
117117
IFS=',' read -ra IM <<< "${images}"
118118
images=""
119119
for i in "${IM[@]}"; do
120-
if gcloud compute instances list "${instance_prefix}-${i}" | grep "${i}"; then
120+
if gcloud compute instances list --project="${project}" --filter="name:'${instance_prefix}-${i}' AND zone:'${zone}'" | grep "${i}"; then
121121
if [[ "${hosts}" != "" ]]; then
122122
hosts="${hosts},"
123123
fi

0 commit comments

Comments
 (0)