Skip to content

Commit

Permalink
Merge pull request kubernetes#43066 from foxish/fix-statefulset-apps
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 43034, 43066)

Fix StatefulSet apps e2e tests

Fixes kubernetes#42490

```release-note
NONE
```

cc @kubernetes/sig-apps-bugs
  • Loading branch information
Kubernetes Submit Queue authored Mar 14, 2017
2 parents dc2b0ee + bcc73db commit 0ea3e9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e/framework/statefulset_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@ func (s *StatefulSetTester) CreateStatefulSet(manifestPath, ns string) *apps.Sta
return filepath.Join(manifestPath, file)
}
ss := StatefulSetFromManifest(mkpath("statefulset.yaml"), ns)
svcYaml := generated.ReadOrDie(mkpath("service.yaml"))
ssYaml := generated.ReadOrDie(mkpath("statefulset.yaml"))

Logf(fmt.Sprintf("creating " + ss.Name + " service"))
RunKubectlOrDie("create", "-f", mkpath("service.yaml"), fmt.Sprintf("--namespace=%v", ns))
RunKubectlOrDieInput(string(svcYaml[:]), "create", "-f", "-", fmt.Sprintf("--namespace=%v", ns))

Logf(fmt.Sprintf("creating statefulset %v/%v with %d replicas and selector %+v", ss.Namespace, ss.Name, *(ss.Spec.Replicas), ss.Spec.Selector))
RunKubectlOrDie("create", "-f", mkpath("statefulset.yaml"), fmt.Sprintf("--namespace=%v", ns))
RunKubectlOrDieInput(string(ssYaml[:]), "create", "-f", "-", fmt.Sprintf("--namespace=%v", ns))
s.WaitForRunningAndReady(*ss.Spec.Replicas, ss)
return ss
}
Expand Down

0 comments on commit 0ea3e9a

Please sign in to comment.