-
Notifications
You must be signed in to change notification settings - Fork 899
chore: add webhook tests for notification subsystem #13942
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
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
506a7e9
to
07b4a69
Compare
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.
I'd like to see all goroutine require
s changed to assert
, but other than that, LGTM!
expectSuccess: false, | ||
expectRetryable: true, | ||
expectErr: "non-2xx response (500)", | ||
}, |
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.
Perhaps we could add a test that sends bad data (wrong format) too, just to have the case covered?
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.
It's not actually possible, the webhook dispatch sends a well-formed request.
See func (w *WebhookHandler) dispatch
Signed-off-by: Danny Kopping <danny@coder.com>
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.
post-merge approval
Closes coder/internal#5