Wait for logs pod to complete before counting lines

This commit is contained in:
Maciej Szulik 2023-01-17 13:38:42 +01:00
parent 3154010eec
commit 3d3da44e96
No known key found for this signature in database
GPG Key ID: F15E55D276FA84C4

View File

@ -183,8 +183,9 @@ var _ = SIGDescribe("Kubectl logs", func() {
ginkgo.It("should log default container if not specified", func(ctx context.Context) {
ginkgo.By("Waiting for log generator to start.")
if !e2epod.CheckPodsRunningReadyOrSucceeded(ctx, c, ns, []string{podName}, framework.PodStartTimeout) {
framework.Failf("Pod %s was not ready", podName)
// we need to wait for pod completion, to check the generated number of lines
if err := e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, c, podName, ns, framework.PodStartTimeout); err != nil {
framework.Failf("Pod %s did not finish: %v", podName, err)
}
ginkgo.By("specified container log lines")