Avoid early exit when collecting post-E2E failure logs.

collectPodsAndNetworkPolicies() is called to collect diagnostics
after a failure.  Previously, if it encountered a failure in getting
the logs it would call Failf(), discarding the rest of the diagnostics
immediately.
This commit is contained in:
Shaun Crampton 2020-05-04 14:32:04 +01:00
parent 4ccfeb18d9
commit 73fe9c9915

View File

@ -1829,7 +1829,7 @@ func collectPodsAndNetworkPolicies(f *framework.Framework, podClient *v1.Pod) ([
logs, logErr = e2epod.GetPreviousPodLogs(f.ClientSet, f.Namespace.Name, podClient.Name, fmt.Sprintf("%s-container", podClient.Name))
}
if logErr != nil {
framework.Failf("Error getting container logs: %s", logErr)
framework.Logf("Error getting container logs: %s", logErr)
}
// Collect current NetworkPolicies applied in the test namespace.