Skip to content

Commit

Permalink
Fixing incorrect type value
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-munro committed Apr 8, 2022
1 parent c38411e commit baff814
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -846,12 +846,12 @@ public static SetStorageClassLifecycleAction newSetStorageClassAction(
}

/**
* Create a new {@code AbortIncompleteMultipartUploadAction}. An incomplete multipart upload
* Create a new {@code AbortIncompleteMPUploadAction}. An incomplete multipart upload
* will be aborted when the multipart upload meets the specified condition. Age is the
* only condition supported for this action.
*/
public static LifecycleAction newAbortIncompleteMultipartUploadAction() {
return new AbortIncompleteMultipartUploadAction();
public static LifecycleAction newAbortIncompleteMPUploadAction() {
return new AbortIncompleteMPUploadAction();
}

/**
Expand Down Expand Up @@ -898,10 +898,10 @@ public StorageClass getStorageClass() {
}
}

public static class AbortIncompleteMultipartUploadAction extends LifecycleAction {
public static class AbortIncompleteMPUploadAction extends LifecycleAction {
public static final String TYPE = "AbortIncompleteMultipartUpload";

private AbortIncompleteMultipartUploadAction() { super(TYPE); }
private AbortIncompleteMPUploadAction() { super(TYPE); }
}
}

Expand Down
Expand Up @@ -65,7 +65,7 @@
import com.google.cloud.storage.Bucket;
import com.google.cloud.storage.BucketInfo;
import com.google.cloud.storage.BucketInfo.LifecycleRule;
import com.google.cloud.storage.BucketInfo.LifecycleRule.AbortIncompleteMultipartUploadAction;
import com.google.cloud.storage.BucketInfo.LifecycleRule.AbortIncompleteMPUploadAction;
import com.google.cloud.storage.BucketInfo.LifecycleRule.LifecycleAction;
import com.google.cloud.storage.BucketInfo.LifecycleRule.LifecycleCondition;
import com.google.cloud.storage.CopyWriter;
Expand Down Expand Up @@ -557,15 +557,15 @@ public void testGetBucketAbortMPULifecycle() {
.setLifecycleRules(
ImmutableList.of(
new LifecycleRule(
LifecycleAction.newAbortIncompleteMultipartUploadAction(),
LifecycleAction.newAbortIncompleteMPUploadAction(),
LifecycleCondition.newBuilder().setAge(1).build())))
.build());
Bucket remoteBucket =
storage.get(lifecycleTestBucketName, Storage.BucketGetOption.fields(BucketField.LIFECYCLE));
LifecycleRule lifecycleRule = remoteBucket.getLifecycleRules().get(0);
try {
assertEquals(
lifecycleRule.getAction().getActionType(), AbortIncompleteMultipartUploadAction.TYPE);
AbortIncompleteMPUploadAction.TYPE, lifecycleRule.getAction().getActionType());
assertEquals(1, lifecycleRule.getCondition().getAge().intValue());
} finally {
storage.delete(lifecycleTestBucketName);
Expand Down

0 comments on commit baff814

Please sign in to comment.