This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 8f30224c330c6de01a432bffb309745688615cce Author: James Netherton <[email protected]> AuthorDate: Wed Jun 8 08:56:50 2022 +0100 Remove redundant AwsS3PresignerProducer from AWS S3 tests --- .../aws2-quarkus-client/aws2-s3/pom.xml | 2 +- .../aws2/s3/it/AwsS3PresignerProducer.java | 60 ---------------------- .../aws2-quarkus-client-grouped/pom.xml | 2 +- 3 files changed, 2 insertions(+), 62 deletions(-) diff --git a/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml index c7d8ab1ebe..1833401f93 100644 --- a/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml +++ b/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml @@ -122,7 +122,7 @@ <properties> <copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-s3</copy-tests.source.dir> <copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir> - <copy-tests.excludes>**/*TestEnvCustomizer,**/*application.properties,**/*AwsS3PresignerProducer.java</copy-tests.excludes> + <copy-tests.excludes>**/*TestEnvCustomizer,**/*application.properties</copy-tests.excludes> </properties> </configuration> </execution> diff --git a/integration-test-groups/aws2/aws2-s3/src/main/java/org/apache/camel/quarkus/component/aws2/s3/it/AwsS3PresignerProducer.java b/integration-test-groups/aws2/aws2-s3/src/main/java/org/apache/camel/quarkus/component/aws2/s3/it/AwsS3PresignerProducer.java deleted file mode 100644 index a5b8fa852e..0000000000 --- a/integration-test-groups/aws2/aws2-s3/src/main/java/org/apache/camel/quarkus/component/aws2/s3/it/AwsS3PresignerProducer.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.component.aws2.s3.it; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Optional; - -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Singleton; - -import org.eclipse.microprofile.config.inject.ConfigProperty; -import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; -import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; -import software.amazon.awssdk.regions.Region; -import software.amazon.awssdk.services.s3.internal.signing.DefaultS3Presigner; -import software.amazon.awssdk.services.s3.presigner.S3Presigner; - -@ApplicationScoped -public class AwsS3PresignerProducer { - - @ConfigProperty(name = "camel.component.aws2-s3.uri-endpoint-override") - Optional<String> uriEndpointOverride; - - @ConfigProperty(name = "camel.component.aws2-s3.region") - String region; - - @ConfigProperty(name = "camel.component.aws2-s3.access-key") - String accessKey; - - @ConfigProperty(name = "camel.component.aws2-s3.secret-key") - String secretKey; - - @Singleton - public S3Presigner awsS3Presigner() throws URISyntaxException { - if (uriEndpointOverride.isPresent()) { - return DefaultS3Presigner.builder() - .region(Region.of(region)) - .credentialsProvider(StaticCredentialsProvider.create( - AwsBasicCredentials.create(accessKey, secretKey))) - .endpointOverride(new URI(uriEndpointOverride.get())) - .build(); - } - return null; - } -} diff --git a/integration-tests/aws2-quarkus-client-grouped/pom.xml b/integration-tests/aws2-quarkus-client-grouped/pom.xml index bdcf5c94d5..62714025e9 100644 --- a/integration-tests/aws2-quarkus-client-grouped/pom.xml +++ b/integration-tests/aws2-quarkus-client-grouped/pom.xml @@ -203,7 +203,7 @@ <properties> <copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-s3</copy-tests.source.dir> <copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir> - <copy-tests.excludes>**/*TestEnvCustomizer,**/*application.properties,**/*AwsS3PresignerProducer.java</copy-tests.excludes> + <copy-tests.excludes>**/*TestEnvCustomizer,**/*application.properties</copy-tests.excludes> </properties> </configuration> </execution>
