From c8cb216e80e52f187681854875157f815546e635 Mon Sep 17 00:00:00 2001 From: Jay Jijie Chen <1180092+jijiechen@users.noreply.github.com> Date: Mon, 23 Sep 2024 09:51:58 +0800 Subject: [PATCH] test(framework): dont print CP logs to stdout on Universal as they can be too long (#11506) dont print CP logs to stdout as they can be too long Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com> --- test/framework/envs/universal/env.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) 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) + } }