diff --git a/test/framework/envs/universal/env.go b/test/framework/envs/universal/env.go index 920afa469718..b96fbea055f2 100644 --- a/test/framework/envs/universal/env.go +++ b/test/framework/envs/universal/env.go @@ -58,18 +58,6 @@ func RestoreState(bytes []byte) { Cluster.SetCp(cp) } -func PrintCPLogsOnFailure(report ginkgo.Report) { - if !report.SuiteSucceeded { - logs, err := Cluster.GetKumaCPLogs() - if err != nil { - framework.Logf("could not retrieve cp logs") - } else { - framework.DebugUniversalCPLogs(Cluster) - framework.Logf(logs) - } - } -} - func ExpectCpToNotPanic() { logs, err := Cluster.GetKumaCPLogs() if err != nil { @@ -89,5 +77,8 @@ func AfterSuite(report ginkgo.Report) { if framework.Config.CleanupLogsOnSuccess { universal_logs.CleanupIfSuccess(framework.Config.UniversalE2ELogsPath, report) } - PrintCPLogsOnFailure(report) + if !report.SuiteSucceeded { + framework.Logf("Please see full CP logs by downloading the debug artifacts") + framework.DebugUniversalCPLogs(Cluster) + } }