From 9f8c6c5fea847da28f60399c7588a6d3a60960c3 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Tue, 12 Dec 2023 11:44:27 +0000 Subject: [PATCH] Add logs to check flaky test --- test/e2e/support-bundle/goldpinger_collector_e2e_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/support-bundle/goldpinger_collector_e2e_test.go b/test/e2e/support-bundle/goldpinger_collector_e2e_test.go index 3b8d5b2aa..ee97393b8 100644 --- a/test/e2e/support-bundle/goldpinger_collector_e2e_test.go +++ b/test/e2e/support-bundle/goldpinger_collector_e2e_test.go @@ -52,6 +52,7 @@ func Test_GoldpingerCollector(t *testing.T) { }). Assess("collect and analyse goldpinger pings", func(ctx context.Context, t *testing.T, c *envconf.Config) context.Context { var out bytes.Buffer + var stdErr bytes.Buffer namespace := c.Namespace() supportBundleName := "goldpinger-test" @@ -64,8 +65,10 @@ func Test_GoldpingerCollector(t *testing.T) { tarPath := filepath.Join(t.TempDir(), fmt.Sprintf("%s.tar.gz", supportBundleName)) cmd := exec.CommandContext(ctx, sbBinary(), specPath, "--interactive=false", "-v=2", fmt.Sprintf("-o=%s", tarPath)) cmd.Stdout = &out + cmd.Stderr = &stdErr err = cmd.Run() - t.Log(out.String()) + t.Logf("Stdout: %s\n", out.String()) + t.Logf("Stderr: %s\n", stdErr.String()) require.NoError(t, err) analysisJSON, err := readFileFromTar(tarPath, fmt.Sprintf("%s/analysis.json", supportBundleName))