e2e.framework.util.StartPods:
The number of pods to start must be non-zero. Otherwise the function waits for pods forever if waitForRunning is true. It the number of replicas is zero, panic so the mistake is heard all over the e2e realm. Update all callers of StartPods to test for non-zero number of replicas.
This commit is contained in:
@@ -2471,12 +2471,12 @@ func (config *RCConfig) start() error {
|
||||
}
|
||||
|
||||
// Simplified version of RunRC, that does not create RC, but creates plain Pods.
|
||||
// optionally waits for pods to start running (if waitForRunning == true)
|
||||
// Optionally waits for pods to start running (if waitForRunning == true).
|
||||
// The number of replicas must be non-zero.
|
||||
func StartPods(c *client.Client, replicas int, namespace string, podNamePrefix string, pod api.Pod, waitForRunning bool) {
|
||||
// no pod to start
|
||||
if replicas < 1 {
|
||||
Logf("No pod to start, skipping...")
|
||||
return
|
||||
panic("StartPods: number of replicas must be non-zero")
|
||||
}
|
||||
startPodsID := string(util.NewUUID()) // So that we can label and find them
|
||||
for i := 0; i < replicas; i++ {
|
||||
|
Reference in New Issue
Block a user