fixture_test.go currently fails
nathantchan opened this issue · 9 comments
After a fresh repo clone, running go 1.9.2, I cannot get the tests to pass:
go test
--- FAIL: TestPanicIsRecoveredAndPrintedByFinalize (0.00s)
fixture_test.go:300: Expected string containing stack trace information...
FAIL
exit status 1
Hmm, very curious. I've just run all the tests several times and I get passing results:
mike@Michael:~/src/github.com/smartystreets/gunit [master]
• go version
go version go1.9.2 darwin/amd64
mike@Michael:~/src/github.com/smartystreets/gunit [master]
• go test ./...
ok github.com/smartystreets/gunit 0.006s
ok github.com/smartystreets/gunit/advanced_examples 0.006s
ok github.com/smartystreets/gunit/basic_examples 0.007s
mike@Michael:~/src/github.com/smartystreets/gunit [master]
• go test -v -run TestPanicIsRecoveredAndPrintedByFinalize
=== RUN TestPanicIsRecoveredAndPrintedByFinalize
--- PASS: TestPanicIsRecoveredAndPrintedByFinalize (0.00s)
PASS
ok github.com/smartystreets/gunit 0.006s
What other information can you provide (OS, etc...)?
I also get passing results in linux land:
vagrant@vagrant:~/src/github.com/smartystreets/gunit [master ?]
• go version
go version go1.9.2 linux/amd64
vagrant@vagrant:~/src/github.com/smartystreets/gunit [master ?]
• go test ./...
ok github.com/smartystreets/gunit 0.003s
ok github.com/smartystreets/gunit/advanced_examples 0.003s
ok github.com/smartystreets/gunit/basic_examples 0.009s
vagrant@vagrant:~/src/github.com/smartystreets/gunit [master ?]
• go test -v -run TestPanicIsRecoveredAndPrintedByFinalize
=== RUN TestPanicIsRecoveredAndPrintedByFinalize
--- PASS: TestPanicIsRecoveredAndPrintedByFinalize (0.00s)
PASS
ok github.com/smartystreets/gunit 0.002s
I'm running tests on the latest commit: a6aa8ec
Here's a listing of checksums:
• md5sum *
md5sum: advanced_examples: Is a directory
md5sum: basic_examples: Is a directory
15802fd8c169c1f15de4cd7b20a5f0b0 CONTRIBUTING.md
0e055ab1575c9153c74646e22d17f507 doc.go
c93862d869aa1b0bf7f0d7d8ec3fc786 failure_report.go
316ce7dbbff4e7f7299fac92df2056dc fixture.go
e83c4fe3c035ec2d25d37e2581a5cf13 fixture_method_info.go
7190899399421bf07a77a8575d84f5db fixture_runner.go
524eccb0329edb3fcd700be25543ac9d fixture_test.go
edfdacc582398e22d9349d022971f963 LICENSE.md
5cfc799232a6c35fc82aadb230fc02f2 Makefile
8e29d8ffbe29db21fe71f40f047ad83e README.md
622c5f4211e6e7f5c6d40ac707efcd93 runner.go
d012497f1365e0fd7964fe3857103ae6 runner_test.go
b96d4008dabc1f7acc5fe05c704d9f4b test_case.go
f341a68e752d8778f7ab2b975c3ea5a0 t.go
Does this match your environment?
Hmm, yeh everything seems to match...but I'm still getting the failures. I'm running on Linux in a Parallels VM on Mac:
nathan@nchan-debian-vm:~/workspace/gunit$ uname -a
Linux nchan-debian-vm 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux
@nathantchan - Very strange. Could you add the following code to the end of the failing test function (maybe at fixture_test.go:305
) and paste the resulting output in a comment?
if t.Failed() {
t.Log("Raw output:\n", output)
}
Aha! I think I found the problem:
if !strings.Contains(output, "github.com/smartystreets/gunit.(*Fixture).finalize") {
t.Error("Expected string containing stack trace information...")
}
This expects a standard GOPATH setup, which I don't have. I can submit a PR to shorten the expected string to just gunit.(*Fixture).finalize.
Sounds good. Glad you found the problem. Just curious, what's your setup? gb?
I am using bazel.
Interesting. Thanks for the info.