We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following panics in v1.10.5:
var err error gomega.WithTransform( func(error) bool { return true }, gomega.BeTrue(), ).Match(err)
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x56b58b] goroutine 1 [running]: github.com/onsi/gomega/matchers.(*WithTransformMatcher).Match(0xc00005e380, 0x0, 0x0, 0x7d5a18, 0xc00005e380, 0xc00006a058) /home/cbandy/go/pkg/mod/github.com/onsi/gomega@v1.10.5/matchers/with_transform.go:45 +0x6b main.main()
I encountered it while using Eventually() to watch for a specific error, e.g.
Eventually()
Eventually(func () error { ... }).Should(WithTransform(os.IsNotExist, BeTrue()))
The text was updated successfully, but these errors were encountered:
Looks like WithTransform doesn't handle the actual being nil:
WithTransform
actual
gomega/matchers/with_transform.go
Lines 42 to 45 in c479356
Sorry, something went wrong.
sounds right - @jim-slattery-rs are you up for and have time to work on a PR to cover this case?
Sure thing, I've created a PR: #422
Successfully merging a pull request may close this issue.
The following panics in v1.10.5:
I encountered it while using
Eventually()
to watch for a specific error, e.g.The text was updated successfully, but these errors were encountered: