You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "Arsnael (via GitHub)" <gi...@apache.org> on 2023/09/14 09:48:32 UTC

[GitHub] [james-project] Arsnael commented on a diff in pull request #1726: [REFACTORING] – S3 Container. S3 Extension for testing...

Arsnael commented on code in PR #1726:
URL: https://github.com/apache/james-project/pull/1726#discussion_r1325696099


##########
server/blob/blob-s3/src/test/java/org/apache/james/blob/objectstorage/aws/S3ConfigurationHelper.java:
##########
@@ -19,23 +19,21 @@
 
 package org.apache.james.blob.objectstorage.aws;
 
-import java.net.URI;
+import static org.apache.james.blob.objectstorage.aws.DockerAwsS3Container.REGION;
 
-public class DockerAwsS3 {
-    private final URI awsS3Endpoint;
-    private final Region region;
+public class S3ConfigurationHelper {
 
-    public DockerAwsS3(URI awsS3Endpoint, Region region) {
-        this.awsS3Endpoint = awsS3Endpoint;
-        this.region = region;
+    public static S3BlobStoreConfiguration.Builder.ReadyToBuild baseBlobStoreConfiguration(DockerAwsS3Container s3Container) {
+        return S3BlobStoreConfiguration.builder()
+            .authConfiguration(authConfiguration(s3Container))
+            .region(REGION);
     }
 
-    public Region region() {
-        return region;
-    }
-
-    public URI awsS3Endpoint() {
-        return awsS3Endpoint;
+    public static AwsS3AuthConfiguration authConfiguration(DockerAwsS3Container s3Container) {
+         return AwsS3AuthConfiguration.builder()

Review Comment:
   indent



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org