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

gotestsum reports nonexistent errors #431

Open
fgm opened this issue Aug 22, 2024 · 1 comment
Open

gotestsum reports nonexistent errors #431

fgm opened this issue Aug 22, 2024 · 1 comment

Comments

@fgm
Copy link

fgm commented Aug 22, 2024

Here is the situation: tests succeed with go test, both on their own and in the embedded go test -json command for gotestsum, but when gotestsum is done, it reports one error where none exists; and what's more it returns with status 0.

# Testing with gotestsum
./bin/gotestsum -f standard-verbose -- -v -count=1 -race ./somepackage
# github.com/someorg/somepackage/some.test
=== RUN   TestFoo
=== RUN   TestFoo/bar
--- PASS: TestFoo (0.00s)
    --- PASS: TestFoo/bar (0.00s)
PASS
ok  	github.com/someorg/somepackage	2.586s

=== Errors

DONE 2 tests, 1 error in 4.981s

$ echo $?
0

# Testing with go test
$ go test                              -v -count=1 -race ./somepackage 
# github.com/someorg/somepackage/some.test
=== RUN   TestFoo
=== RUN   TestFoo/bar
--- PASS: TestFoo (0.00s)
    --- PASS: TestFoo/bar (0.00s)
PASS
ok  	github.com/someorg/somepackage	1.636s

$ echo $?
0

Tested on

  • macOS Sonoma, Apple Silicon.
  • Both with go 1.22.6 and 1.23.0.
  • gotestsum version dev
@dnephin
Copy link
Member

dnephin commented Aug 29, 2024

Hello, thank you for the bug report! Errors come from any stderr that is emitted from the test binary. I don't see any lines in this example. Do you have some code I can run to reproduce?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants