Skip to content

Commit

Permalink
test: AmazonS3UtilsTest uses explicit anonymous credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
bogovicj committed Jun 4, 2024
1 parent f62cfdd commit dd8d7ca
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

import org.junit.Test;

import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.AnonymousAWSCredentials;

public class AmazonS3UtilsTest {

@Test
Expand Down Expand Up @@ -38,7 +41,10 @@ public void testUriParsing() throws URISyntaxException {
final URI uri = new URI(uriString);
assertEquals("bucket from uri", bucket, AmazonS3Utils.getS3Bucket(uri));
assertEquals("key from uri", path, AmazonS3Utils.getS3Key(uri));
AmazonS3Utils.createS3(uriString);
AmazonS3Utils.createS3(uriString,
null,
new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()),
null);
}

}
Expand Down

0 comments on commit dd8d7ca

Please sign in to comment.