mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 04:27:54 +00:00
Merge pull request #118141 from dims/grab-logs-from-all-the-containers-when-DNS-related-tests-fail
Grab logs from all the containers when DNS related tests fail
This commit is contained in:
commit
60e747896a
@ -487,6 +487,14 @@ func assertFilesContain(ctx context.Context, fileNames []string, fileDir string,
|
||||
return true, nil
|
||||
}
|
||||
framework.Logf("Lookups using %s/%s failed for: %v\n", pod.Namespace, pod.Name, failed)
|
||||
|
||||
// grab logs from all the containers
|
||||
for _, container := range pod.Spec.Containers {
|
||||
logs, err := e2epod.GetPodLogs(ctx, client, pod.Namespace, pod.Name, container.Name)
|
||||
framework.ExpectNoError(err)
|
||||
framework.Logf("Pod client logs for %s: %s", container.Name, logs)
|
||||
}
|
||||
|
||||
return false, nil
|
||||
}))
|
||||
framework.ExpectEqual(len(failed), 0)
|
||||
|
Loading…
Reference in New Issue
Block a user