k8s-repoter: dump artifacts at AfterSuite
Enable us to get the cluster state when AfterSuite
errors occures, making it much easier to debug.
@@ -668,7 +668,10 @@ func (r *KubernetesReporter) dumpK8sEntityToFile(virtCli kubecli.KubevirtClient,
}
func (r *KubernetesReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) {
-
+ if setupSummary.State.IsFailure() {
+ r.failureCount++
+ r.Dump(setupSummary.RunTime)
+ }
}
func (r *KubernetesReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) {
