-
Notifications
You must be signed in to change notification settings - Fork 163
[MM-956]: Added server testcase for webhook.go #855
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
Conversation
…attermost-plugin-github into add_server/command.go_testcases
…attermost-plugin-github into add_server/command.go_testcases
server/plugin/webhook_test.go
Outdated
| pushEvent: GetMockPushEvent(), | ||
| setup: func() { | ||
| mockKvStore.EXPECT().Get(SubscriptionsKey, gomock.Any()).DoAndReturn(func(key string, value interface{}) error { | ||
| if v, ok := value.(**Subscriptions); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using double * here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kshitij-Katiyar I do not think we need the double pointer here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raghavaggarwal2308 Double-pointers are very much required here to handle the case of no subscription stored
Using single pointer can make the code more complicated but we can do it.
Let me know your thoughts on this
|
@raghavaggarwal2308 FIxed the comments, please re-review |
* [MM-974]: Added testcase fore more functions in webhook.go * review fixes * removed invalid testcase

Summary
Added server testcase for webhook.go