opentelemetry-collector-contrib
opentelemetry-collector-contrib copied to clipboard
[chore] Use gotestsum wrapper for go tests
Description: <Describe what has changed.>
Use https://github.com/gotestyourself/gotestsum for running tests.
This PR only adds the wrapper. A future PR could add --rerun-fails
, but since that is, I presume, more controversial, I want to start just with the basics, which already improves readability.
Link to tracking Issue: Relates to #30880
cc @open-telemetry/collector-contrib-approvers does this seem like a good idea to you? The main benefit from this PR is that the output format is nicer and it makes tests logs a bit more manageable. We could also introduce rerun on failed (see https://github.com/gotestyourself/gotestsum#documentation for more details)
The only nit is that GOTEST used GOCMD, which (IIUC) could be used to set a different version of go, but I don't think we used this anyway?
I can't say with certainty that someone out there is not using this, but we don't use it on CI AFAICT, and we could add it back if needed by using gotestsum
's --raw-command
option