Commit ef80fcc9 authored by Fabio Yeon's avatar Fabio Yeon

Merge pull request #20289 from mml/kubectl-log-e2e

Add debug output to kubectl-log-e2e.
parents 2bc12a2a 54a79046
...@@ -771,11 +771,11 @@ var _ = Describe("Kubectl client", func() { ...@@ -771,11 +771,11 @@ var _ = Describe("Kubectl client", func() {
By("restricting to a time range") By("restricting to a time range")
time.Sleep(1500 * time.Millisecond) // ensure that startup logs on the node are seen as older than 1s time.Sleep(1500 * time.Millisecond) // ensure that startup logs on the node are seen as older than 1s
out = runKubectlOrDie("log", pod.Name, containerName, nsFlag, "--since=1s") recent_out := runKubectlOrDie("log", pod.Name, containerName, nsFlag, "--since=1s")
recent := len(strings.Split(out, "\n")) recent := len(strings.Split(recent_out, "\n"))
out = runKubectlOrDie("log", pod.Name, containerName, nsFlag, "--since=24h") older_out := runKubectlOrDie("log", pod.Name, containerName, nsFlag, "--since=24h")
older := len(strings.Split(out, "\n")) older := len(strings.Split(older_out, "\n"))
Expect(recent).To(BeNumerically("<", older)) Expect(recent).To(BeNumerically("<", older), "expected recent(%v) to be less than older(%v)\nrecent lines:\n%v\nolder lines:\n%v\n", recent, older, recent_out, older_out)
}) })
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment