Merge pull request #21335 from deads2k/make-rc-logs-work

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2016-03-05 09:37:24 -08:00
2 changed files with 54 additions and 8 deletions

View File

@@ -464,7 +464,7 @@ var _ = Describe("Kubectl client", func() {
withStdinData("abcd1234\n").
execOrDie()
Expect(runOutput).ToNot(ContainSubstring("stdin closed"))
runTestPod, err := util.GetFirstPod(c, ns, labels.SelectorFromSet(map[string]string{"run": "run-test-3"}))
runTestPod, _, err := util.GetFirstPod(c, ns, labels.SelectorFromSet(map[string]string{"run": "run-test-3"}))
if err != nil {
os.Exit(1)
}
@@ -898,6 +898,13 @@ var _ = Describe("Kubectl client", func() {
runKubectlOrDie("get", "pods", "-L", "run", nsFlag)
Failf("Failed creating 1 pod with expected image %s. Number of pods = %v", nginxImage, len(pods))
}
By("confirm that you can get logs from an rc")
_, err = runKubectl("logs", "rc/"+rcName, nsFlag)
// a non-nil error is fine as long as we actually found a pod.
if err != nil && !strings.Contains(err.Error(), " in pod ") {
Failf("Failed getting logs by rc %s: %v", rcName, err)
}
})
})