Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up test logs #190

Merged
merged 2 commits into from
Sep 30, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func run(node string, command ...string) (string, error) {
cmd.Stderr = &stderr
cmd.Stdout = &stdout
err := cmd.Run()
GinkgoWriter.Write([]byte(stdout.String() + stderr.String() + "\n"))
GinkgoWriter.Write([]byte(fmt.Sprintf("stdout: %.500s...\n, stderr %s\n", stdout.String(), stderr.String())))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it would be worth setting this via an environment variable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do like this, in case of error vlans are show in full so we are good, another option is to dump to files the full output and print the truncated ones.

// Remove first two lines from output, ssh.sh add garbage there
outputLines := strings.Split(stdout.String(), "\n")
output := strings.Join(outputLines[2:], "\n")
Expand Down