-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add support for Events in k8s module #1297
Conversation
This PR currently only adds support for listing events which, in my opinion, is the most used |
Hi @denis256! You helped me with other PRs, do you think there's something missing in this one to get it merged? Thanks! |
Hi @zachreborn @denis256 ! Do you think this proposal is worth to be merged? Thanks! |
|
||
// ListEvents will retrieve the Events in the given namespace that match the given filters and return them. This will fail the | ||
// test if there is an error. | ||
func ListEvents(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []corev1.Event { |
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.
Will be helpful to have tests for ListEvents
to track that in the future function will continue to work
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.
Thank you for your review @denis256 . I've done my tests with kubectl and it turns out that the events API doesn't return an error even if you provide the wrong namespace/filters.
That's why I rewrote the current tests to use the ListEvents
function and also added a new test which makes sure that ListEventsE
returns a nil
error. What do you think?
8722211
to
c7f46e3
Compare
c7f46e3
to
61d9985
Compare
Failed tests aren't related with implemented changes |
Description
This PR adds support for k8s
Events
as stated in #1296TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Migration Guide
There aren`t backwards incompatible changes