Skip to content

Commit

Permalink
Add logs to check flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
banjoh committed Dec 12, 2023
1 parent 53113c0 commit 9f8c6c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/e2e/support-bundle/goldpinger_collector_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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))
Expand Down

0 comments on commit 9f8c6c5

Please sign in to comment.