Confirms daemons restart and do sane things in an e2e test

This commit is contained in:
Prashanth Balasubramanian
2015-06-23 16:20:04 -07:00
parent 5ea41906d4
commit 83f1212e0b
5 changed files with 287 additions and 7 deletions

View File

@@ -1376,7 +1376,7 @@ func getNodeEvents(c *client.Client, nodeName string) []api.Event {
return events.Items
}
func ScaleRC(c *client.Client, ns, name string, size uint) error {
func ScaleRC(c *client.Client, ns, name string, size uint, wait bool) error {
By(fmt.Sprintf("%v Scaling replication controller %s in namespace %s to %d", time.Now(), name, ns, size))
scaler, err := kubectl.ScalerFor("ReplicationController", kubectl.NewScalerClient(c))
if err != nil {
@@ -1387,6 +1387,9 @@ func ScaleRC(c *client.Client, ns, name string, size uint) error {
if err = scaler.Scale(ns, name, size, nil, waitForScale, waitForReplicas); err != nil {
return err
}
if !wait {
return nil
}
return waitForRCPodsRunning(c, ns, name)
}