You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dolmen
changed the title
test panicked: reflect: Call with too few input arguments
suite: missing signature check before calling Test* method
Nov 22, 2023
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 t.Errorf instead of t.Fatalf to report invalid method signatures while continuing the execution of valid methods. The PR also includes additional test scenarios covering both valid and invalid method signatures.
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: