-
Notifications
You must be signed in to change notification settings - Fork 28
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
Variadic Issue? not really sure. #112
Comments
Hello again @flyinprogrammer, So just started looking into this and it is weird, because there's an actual unit test for this: Lines 730 to 780 in e07328a
So taking a deeper look at it right now. |
Actually, now that I look at it, these tests only use the argument capture mechanism. Need to check why this is the case (sorry, written this 4 years ago 😬 ) |
Ah. The crux is here: Lines 371 to 374 in 6d417a0
This logic is wrong and must be fixed. It might not be as simple as removing this check. |
Context: See the context here: #111
Oh hello again!!
So now I've made a new discovery! I've tried mocking out this fancy
PostMessage
method in the slack client:https://github.com/slack-go/slack/blob/master/chat.go#L123
So I wrote an interface and simple wrapper method to mock out something we sort of do in the Atlantis app:
And then a simple test to ensure that our slack client receives something we expect:
And it goes 💥 with:
Which is quite odd because it was invoked with the signature, but somehow it wasn't?
Here's the example project: https://github.com/flyinprogrammer/pegomock_examples/tree/issue/variadic
I've tried debugging this in GoLand, but unfortunately I am 🥔. I'll keep poking this to learn how this project works, but if someone happens to know a workaround, or is up for teaching me how or what went wrong I'd love to learn.
The text was updated successfully, but these errors were encountered: