-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat: Support AbortIncompleteMultipartUpload LifecycleAction #1347
Conversation
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.
One nit; otherwise LGTM
google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java
Outdated
Show resolved
Hide resolved
try { | ||
assertEquals(AbortIncompleteMPUAction.TYPE, lifecycleRule.getAction().getActionType()); | ||
assertEquals(1, lifecycleRule.getCondition().getAge().intValue()); | ||
} finally { |
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.
ah interesting; didn't think of wrapping asserts with a try {} so you can do clean up afterwards, clever.
google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java
Show resolved
Hide resolved
…ecycle action tests
@@ -346,6 +351,9 @@ public void testLifecycleRules() { | |||
setStorageClassLifecycleRule.getAction().getStorageClass()); | |||
assertTrue(setStorageClassLifecycleRule.getCondition().getIsLive()); | |||
assertEquals(10, setStorageClassLifecycleRule.getCondition().getNumNewerVersions().intValue()); | |||
assertTrue( |
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.
just added these in since I didn't see us testing all the cases of the fromPb switch statement.
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, thanks @sydney-munro!
Fixes #1339 ☕️
If you write sample code, please follow the samples format.