pinniped icon indicating copy to clipboard operation
pinniped copied to clipboard

testlib: invalid assumption about nil return from recover()

Open enj opened this issue 3 years ago • 0 comments

This code is incorrect:

https://github.com/vmware-tanzu/pinniped/blob/c4d7e5c124ecacb39b01973538ea6bfd937eb950/test/testlib/assertions.go#L51-L52

because a test can fail with panic(nil).

The go std lib testing package handles this correctly.

enj avatar Aug 11 '21 15:08 enj