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

Test output of go tests is not printed in CI #21685

Closed
jsoriano opened this issue Oct 8, 2020 · 2 comments · Fixed by #22541
Closed

Test output of go tests is not printed in CI #21685

jsoriano opened this issue Oct 8, 2020 · 2 comments · Fixed by #22541
Assignees
Labels
bug Team:Automation Label for the Observability productivity team :Testing

Comments

@jsoriano
Copy link
Member

jsoriano commented Oct 8, 2020

When a go test fails, its output is not printed, difficulting the investigation of the problem.

For example the stacktrace of the failure in this build is only displayed as:

logger_test.go:43: 
    logger_test.go:59:

The problem may be in the library we use to parse the output to generate the junit files:

report, err := parser.Parse(bytes.NewBuffer(bufferOutput.Bytes()), BeatName)

Perhaps a different approach could be to do the parsing based on the JSON output of go test.

Ideally we should be able to:

  • Always show the output of go test or equivalent information.
  • Enable verbose output of go test when verbosity is enabled in mage.
  • Still generate the junit files for jenkins.
@jsoriano jsoriano added Team:Automation Label for the Observability productivity team :Testing bug labels Oct 8, 2020
@v1v
Copy link
Member

v1v commented Oct 14, 2020

Another example:

image

@jsoriano
Copy link
Member Author

jsoriano commented Dec 8, 2020

Maybe we can use gotestsum to fix this as explored here: #22541 Thanks @urso!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Automation Label for the Observability productivity team :Testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants