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
object: fix handling for notifications for OBC #9365
object: fix handling for notifications for OBC #9365
Conversation
looks good! |
5b0b754
to
f1dee39
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.
see comment: #9365 (comment)
unit tests should cover the case where some notifications are added some deleted and some unchanged.
this could be verified by mocking the "get", "create" and "delete" functions for this specific test.
the verification can make sure that each notifications is handled correctly (and not only that the functions are invoked)
f1dee39
to
4e8f783
Compare
Done |
4e8f783
to
58dc412
Compare
pkg/operator/ceph/object/notification/obc_label_controller_test.go
Outdated
Show resolved
Hide resolved
58dc412
to
dbd5436
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.
Looks good. I think all test cases are covered. But I do think we should be verifying correctness of the important aspects of the create/delete calls, not just that they are called.
Also, all logger.{Error,Warning,Info,Debug}
messages should include namespaced names for context because a user may create the same name for a resource in multiple namespaces.
pkg/operator/ceph/object/notification/obc_label_controller_test.go
Outdated
Show resolved
Hide resolved
dbd5436
to
d26161c
Compare
pkg/operator/ceph/object/notification/obc_label_controller_test.go
Outdated
Show resolved
Hide resolved
Current approach is to delete all the existing notifcations from bucket and re-add the notification from the labels. Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
d26161c
to
9d9acc2
Compare
object: fix handling for notifications for OBC (backport #9365)
Current approach is to delete all the existing notifcations from bucket
and re-add the notification from the labels.
Signed-off-by: Jiffin Tony Thottan thottanjiffin@gmail.com
Description of your changes:
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
make codegen
) has been run to update object specifications, if necessary.