Merge pull request #9506 from cjcullen/resize

Make resize tests work on GKE
pull/6/head
Abhi Shah 2015-06-11 11:05:07 -07:00
commit c5553af281
3 changed files with 21 additions and 2 deletions

View File

@ -249,6 +249,21 @@ function detect-minion-names {
echo "MINION_NAMES=${MINION_NAMES[*]}" echo "MINION_NAMES=${MINION_NAMES[*]}"
} }
# Detect instance group name generated by gke
#
# Assumed vars:
# GCLOUD
# PROJECT
# ZONE
# CLUSTER_NAME
# Vars set:
# NODE_INSTANCE_GROUP
function detect-node-instance-group {
NODE_INSTANCE_GROUP=$("${GCLOUD}" alpha container clusters describe \
--project="${PROJECT}" --zone="${ZONE}" "${CLUSTER_NAME}" \
| grep instanceGroupManagers | cut -d '/' -f 11)
}
# SSH to a node by name ($1) and run a command ($2). # SSH to a node by name ($1) and run a command ($2).
# #
# Assumed vars: # Assumed vars:

View File

@ -83,6 +83,10 @@ else
NODE_INSTANCE_GROUP="" NODE_INSTANCE_GROUP=""
fi fi
if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then
detect-node-instance-group
fi
ginkgo_args=() ginkgo_args=()
if [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then if [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then
ginkgo_args+=("-p") ginkgo_args+=("-p")

View File

@ -77,7 +77,7 @@ func waitForNodeInstanceGroupSize(size int) error {
continue continue
} }
if currentSize != size { if currentSize != size {
Logf("Waiting for node istance group size %d, current size %d", size, currentSize) Logf("Waiting for node instance group size %d, current size %d", size, currentSize)
continue continue
} }
Logf("Node instance group has reached the desired size %d", size) Logf("Node instance group has reached the desired size %d", size)
@ -224,7 +224,7 @@ func waitForPodsCreatedRunningResponding(c *client.Client, ns, name string, repl
} }
var _ = Describe("Nodes", func() { var _ = Describe("Nodes", func() {
supportedProviders := []string{"gce"} supportedProviders := []string{"gce", "gke"}
var testName string var testName string
var c *client.Client var c *client.Client
var ns string var ns string