-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
suite: missing signature check before calling Test* method #1508
Comments
Please provide an example running on go.dev/play. |
I've added a go.dev example. |
This is definitely a dirty bug: Suite should check the method signature and report a test failure if the type doesn't match. A PR would be welcome. |
Hi, I would like to take this up, so please assign me to the issue. I’ve noticed the PR linked to this issue, but I’m not sure if it’s still active. I have raised a new PR with the required improvements. I agree with @dolmen's point that we should check for invalid method signatures earlier in the flow, after the methodFilter. Additionally, I used You can find the new PR here. @brackendawson @dolmen @arjunmahishi Let me know your thoughts or if any further changes are needed! |
If a test method on a suite has a parameter there is a panic:
When running this you get the following panic:
I think the error handling could be more clear here. Something like "method TestUpdateSomething on SomeTestSuite contains arguments"
Here is the go.dev link: https://go.dev/play/p/cNNfqH5QpeQ
I can create a pull request if this change is wanted?
Edit: Some more context. I run into this problem when I am porting old test methods to a suite.
The text was updated successfully, but these errors were encountered: