mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
fix pod get logs over websocket e2e test
Signed-off-by: Vishnu kannan <vishnuk@google.com>
This commit is contained in:
parent
8675adf138
commit
8e29b98128
@ -530,17 +530,13 @@ var _ = framework.KubeDescribe("Pods", func() {
|
|||||||
{
|
{
|
||||||
Name: "main",
|
Name: "main",
|
||||||
Image: "gcr.io/google_containers/busybox:1.24",
|
Image: "gcr.io/google_containers/busybox:1.24",
|
||||||
Command: []string{"/bin/sh", "-c", "echo container is alive; sleep 600"},
|
Command: []string{"/bin/sh", "-c", "echo container is alive; sleep 10000"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
By("submitting the pod to kubernetes")
|
By("submitting the pod to kubernetes")
|
||||||
defer func() {
|
|
||||||
By("deleting the pod")
|
|
||||||
podClient.Delete(pod.Name, api.NewDeleteOptions(0))
|
|
||||||
}()
|
|
||||||
podClient.CreateSync(pod)
|
podClient.CreateSync(pod)
|
||||||
|
|
||||||
req := f.Client.Get().
|
req := f.Client.Get().
|
||||||
@ -566,7 +562,7 @@ var _ = framework.KubeDescribe("Pods", func() {
|
|||||||
}
|
}
|
||||||
framework.Failf("Failed to read completely from websocket %s: %v", url.String(), err)
|
framework.Failf("Failed to read completely from websocket %s: %v", url.String(), err)
|
||||||
}
|
}
|
||||||
if len(msg) == 0 {
|
if len(strings.TrimSpace(string(msg))) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
buf.Write(msg)
|
buf.Write(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user