-
Notifications
You must be signed in to change notification settings - Fork 362
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
fix s3 notificationConfiguration #917
fix s3 notificationConfiguration #917
Conversation
@smcavallo can you squash commits for Clean history ? |
Signed-off-by: smcavallo <smcavallo@hotmail.com>
05634a7
to
440013a
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.
Thanks again @smcavallo!
} | ||
return true | ||
}) | ||
} |
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 is totally fine as is, but for future reference you could also pass in a couple ofcmpopts.SortSlices
options, each with a less function for a slice of the relevant type of struct.
g := NewGomegaWithT(t) | ||
actual, err := IsNotificationConfigurationUpToDate(tc.args.cr, tc.args.b) | ||
g.Expect(err).NotTo(HaveOccurred()) |
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.
We try to avoid Gomega usage in our tests. I want to include this with the v0.21.1 release today so I plan to merge and quickly follow up to remove this.
Successfully created backport PR #962 for |
Signed-off-by: smcavallo smcavallo@hotmail.com
fixes s3 notificationConfiguration continually being updated.
Description of your changes
Updates
IsUpToDate
comparisons fornotificationConfiguration
- most notably ignore theId
and ignore ordering when there are multiple configurations.Adds additional unit tests.
Note: this excludes the
Id
properties during the comparison. This should be fine because the actual rules are being compared.Per the docs https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-notification-configuration.html
Ignoring the
Id
in the comparison is workaround since these properties are notLateInitialized
Fixes #896
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
ID
in the console has not changedID
in the console has not changed