Don't stop the next poll when it fails to grab logs

This commit is contained in:
carlory
2024-11-02 13:31:36 +08:00
parent 2c4a863bf9
commit bd0c5a40f8

View File

@@ -508,7 +508,10 @@ func assertFilesContain(ctx context.Context, fileNames []string, fileDir string,
// grab logs from all the containers // grab logs from all the containers
for _, container := range pod.Spec.Containers { for _, container := range pod.Spec.Containers {
logs, err := e2epod.GetPodLogs(ctx, client, pod.Namespace, pod.Name, container.Name) logs, err := e2epod.GetPodLogs(ctx, client, pod.Namespace, pod.Name, container.Name)
framework.ExpectNoError(err) if err != nil {
framework.Logf("Unable to get logs for %s: %v", container.Name, err)
continue
}
framework.Logf("Pod client logs for %s: %s", container.Name, logs) framework.Logf("Pod client logs for %s: %s", container.Name, logs)
} }