-
Notifications
You must be signed in to change notification settings - Fork 155
MM-47355: Added multierr for postListCmdF (#21222) #564
MM-47355: Added multierr for postListCmdF (#21222) #564
Conversation
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
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.
This looks good, wondering if you can update the tests as well?
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.
Hi @witjem, thank you very much for your contribution. Please update the tests to check for the error. I've also got a small request for a change. Other than that it looks very good.
6749fa5
to
f9bfa75
Compare
I tried write test for it, but for this need mock websocket client. I can do it, but I think for this PR will be a lot changes for this issue, and maybe better create new issue for it? |
You don't need to write tests from scratch, just need to reflect the changes you made in the test file so that tests get pass. Because the function now returns an error. |
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.
Looks good, thank you. Updated tests would still be nice.
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
@noxer Which tests I should updates? All tests is pass) |
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 meant adding tests for the new errors. I agree that in this case it might not be that easy.
LGTM
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.
LGTM, agreed testing can be a bit complicated. Thanks @witjem 🎉
Summary
Adds error handling for postListCmdF. The errors are grouped with multierror.Error package and returned once the loop is done.
Ticket Link
Fixes mattermost/mattermost#21222