Skip to content

Commit

Permalink
Fix ownership for new buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
abashev committed Aug 5, 2023
1 parent 302777f commit 25acc1e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import static com.amazonaws.SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR;
import static com.amazonaws.SDKGlobalConfiguration.SECRET_KEY_ENV_VAR;
import static com.amazonaws.services.s3.model.ownership.ObjectOwnership.ObjectWriter;
import static java.lang.Boolean.parseBoolean;
import static java.util.stream.Collectors.joining;
import static org.testng.Assert.assertTrue;
Expand Down Expand Up @@ -66,6 +67,7 @@ public final void initBucket() throws IOException {
configuration.computeIfPresent(DISABLE_CHUNKED_ENCODING, v -> options.setDisableChunkedEncoding(parseBoolean(v)));

options.setCreateBucket(true);
options.setObjectOwnership(ObjectWriter);

String token = (new Random()).ints(3).mapToObj(Integer::toHexString).collect(joining());

Expand Down

0 comments on commit 25acc1e

Please sign in to comment.