mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Flake 21484: retrieve pod log during e2e error
This commit is contained in:
parent
8f104a7b0f
commit
eea7ed21da
@ -243,6 +243,13 @@ func proxyContext(version string) {
|
|||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
if len(errors) != 0 {
|
if len(errors) != 0 {
|
||||||
|
body, err := f.Client.Pods(f.Namespace.Name).GetLogs(pods[0].Name, &api.PodLogOptions{}).Do().Raw()
|
||||||
|
if err != nil {
|
||||||
|
framework.Logf("Error getting logs for pod %s: %v", pods[0].Name, err)
|
||||||
|
} else {
|
||||||
|
framework.Logf("Pod %s has the following error logs: %s", pods[0].Name, body)
|
||||||
|
}
|
||||||
|
|
||||||
Fail(strings.Join(errors, "\n"))
|
Fail(strings.Join(errors, "\n"))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user