Skip to content

Commit

Permalink
test(framework): dont print CP logs to stdout on Universal as they ca…
Browse files Browse the repository at this point in the history
…n be too long (#11506)

dont print CP logs to stdout as they can be too long

Signed-off-by: Jay Chen <[email protected]>
  • Loading branch information
jijiechen authored Sep 23, 2024
1 parent 7118669 commit c8cb216
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions test/framework/envs/universal/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
}

0 comments on commit c8cb216

Please sign in to comment.