Skip to content

Commit c686aa5

Browse files
authored
Merge pull request #395 from msau42/regional-tests
Add region env for run-k8s-integration.sh
2 parents 45e7aeb + 0427343 commit c686aa5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/run-k8s-integration.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ readonly deployment_strategy=${DEPLOYMENT_STRATEGY:-gce}
1717
readonly gke_cluster_version=${GKE_CLUSTER_VERSION:-latest}
1818
readonly kube_version=${GCE_PD_KUBE_VERSION:-master}
1919
readonly test_version=${TEST_VERSION:-master}
20+
readonly gce_zone=${GCE_CLUSTER_ZONE:-us-central1-b}
21+
readonly gce_region=${GCE_CLUSTER_REGION:-}
2022

2123
export GCE_PD_VERBOSITY=9
2224

@@ -25,7 +27,7 @@ make -C ${PKGDIR} test-k8s-integration
2527
base_cmd="${PKGDIR}/bin/k8s-integration-test \
2628
--run-in-prow=true --deploy-overlay-name=${overlay_name} --service-account-file=${E2E_GOOGLE_APPLICATION_CREDENTIALS} \
2729
--do-driver-build=${do_driver_build} --boskos-resource-type=${boskos_resource_type} \
28-
--storageclass-file=sc-standard.yaml --test-focus="External.Storage" --gce-zone="us-central1-b" \
30+
--storageclass-file=sc-standard.yaml --test-focus="External.Storage" \
2931
--deployment-strategy=${deployment_strategy} --test-version=${test_version} --num-nodes=3"
3032

3133
if [ "$deployment_strategy" = "gke" ]; then
@@ -34,4 +36,10 @@ else
3436
base_cmd="${base_cmd} --kube-version=${kube_version}"
3537
fi
3638

39+
if [ -z "$gce_region" ]; then
40+
base_cmd="${base_cmd} --gce-zone=${gce_zone}"
41+
else
42+
base_cmd="${base_cmd} --gce-region=${gce_region}"
43+
fi
44+
3745
eval $base_cmd

0 commit comments

Comments
 (0)