-
Notifications
You must be signed in to change notification settings - Fork 673
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
MG-2147 - Generate mocks with mockery for Consumer service #2150
MG-2147 - Generate mocks with mockery for Consumer service #2150
Conversation
b7b378b
to
46b893c
Compare
pkg/sdk/go/consumers_test.go
Outdated
} | ||
} | ||
|
||
func GetSubscriptionsSlice(subs []sdk.Subscription, start, end int) []notifiers.Subscription { |
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.
Simplify and rename (and don't export):
func subscriptionsSlice(subs []sdk.Subscription, start, end int) []notifiers.Subscription {
var res []notifiers.Subscription
for i := start; i < end; i++ {
sub := subs[i]
res = append(res, notifiers.Subscription{
ID: sub.ID,
OwnerID: sub.OwnerID,
Contact: sub.Contact,
Topic: sub.Topic,
})
}
return res
}
ed11150
to
33344a7
Compare
65dfb7f
to
6cbb677
Compare
3b487c1
to
aa0a128
Compare
3ce8750
to
0e05fbe
Compare
5b10e35
to
161e57a
Compare
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
161e57a
to
b8a2968
Compare
consumers/notifiers/service_test.go
Outdated
@@ -181,6 +193,8 @@ func TestListSubscriptions(t *testing.T) { | |||
Subscriptions: subs[:3], | |||
Total: total, | |||
}, | |||
identifyErr: nil, | |||
identityRes: &magistrala.IdentityRes{Id: validID}, |
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.
User string instead of the full response; return response in the assert. Do the same for all the other test cases.
Signed-off-by: nyagamunene <[email protected]>
) Signed-off-by: nyagamunene <[email protected]>
) Signed-off-by: nyagamunene <[email protected]> Signed-off-by: JeffMboya <[email protected]>
What type of PR is this?
This is a feature because its add the following functionality: generates mocks for consumers.
What does this do?
It generates the mocks for consumers service.
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Yes, I have included tests
Did you document any new/modified feature?
No, I have not updated the documentation.
Notes