Skip to content

Commit

Permalink
aws
Browse files Browse the repository at this point in the history
  • Loading branch information
Croway committed Nov 28, 2024
1 parent 3f5d893 commit ea8b20e
Show file tree
Hide file tree
Showing 58 changed files with 358 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws.config.AWSConfigComponent;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class AWSConfigBase extends CamelTestSupport {
@RegisterExtension
public static AWSService service = AWSServiceFactory.createConfigService();
public static AWSTestService service = AWSServiceFactory.createConfigService();

@Override
protected CamelContext createCamelContext() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
*/
package org.apache.camel.component.aws.secretsmanager.integration;

import java.net.URI;

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws.secretsmanager.SecretsManagerComponent;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand All @@ -32,10 +30,12 @@
import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
import software.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilder;

import java.net.URI;

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public abstract class AwsSecretsManagerBaseTest extends CamelTestSupport {
@RegisterExtension
public static AWSService service = AWSServiceFactory.createSecretsManagerService();
public static AWSTestService service = AWSServiceFactory.createSecretsManagerService();

@Override
protected CamelContext createCamelContext() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws2.cw.Cw2Component;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class Aws2CwBase extends CamelTestSupport {
@RegisterExtension
public static AWSService service = AWSServiceFactory.createCloudWatchService();
public static AWSTestService service = AWSServiceFactory.createCloudWatchService();

@Override
protected CamelContext createCamelContext() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws2.ddb.Ddb2Component;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand All @@ -30,7 +30,7 @@
public class Aws2DDBBase extends CamelTestSupport {

@RegisterExtension
public static AWSService service = AWSServiceFactory.createSingletonDynamoDBService();
public static AWSTestService service = AWSServiceFactory.createSingletonDynamoDBService();

protected DynamoDbClient ddbClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@
*/
package org.apache.camel.component.aws2.ddbstream;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.health.HealthCheck;
import org.apache.camel.health.HealthCheckHelper;
import org.apache.camel.health.HealthCheckRegistry;
import org.apache.camel.health.HealthCheckRepository;
import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import static org.testcontainers.shaded.org.awaitility.Awaitility.await;

public class Ddb2StreamConsumerHealthCheckIT extends CamelTestSupport {

@RegisterExtension
public static AWSService service = AWSServiceFactory.createSingletonS3Service();
public static AWSTestService service = AWSServiceFactory.createSingletonS3Service();

CamelContext context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws2.ec2.AWS2EC2Component;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand All @@ -29,7 +29,7 @@
public class Aws2EC2Base extends CamelTestSupport {
@SuppressWarnings("unused")
@RegisterExtension
public static AWSService service = AWSServiceFactory.createEC2Service();
public static AWSTestService service = AWSServiceFactory.createEC2Service();

@Override
protected CamelContext createCamelContext() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws2.eventbridge.EventbridgeComponent;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand All @@ -29,7 +29,7 @@
public class Aws2EventbridgeBase extends CamelTestSupport {

@RegisterExtension
public static AWSService service = AWSServiceFactory.createSingletonEventBridgeService();
public static AWSTestService service = AWSServiceFactory.createSingletonEventBridgeService();

@Override
protected CamelContext createCamelContext() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import org.apache.camel.component.aws2.eventbridge.EventbridgeComponent;
import org.apache.camel.component.aws2.eventbridge.EventbridgeConstants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
Expand All @@ -37,7 +37,7 @@
public class EventbridgePutEventsIT extends CamelTestSupport {

@RegisterExtension
public static AWSService service = AWSServiceFactory.createEventBridgeService();
public static AWSTestService service = AWSServiceFactory.createEventBridgeService();

@EndpointInject
private ProducerTemplate template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws2.iam.IAM2Component;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.RegisterExtension;

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class Aws2IAMBase extends CamelTestSupport {
@RegisterExtension
public static AWSService service = AWSServiceFactory.createIAMService();
public static AWSTestService service = AWSServiceFactory.createIAMService();

@Override
protected CamelContext createCamelContext() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@
*/
package org.apache.camel.component.aws2.kinesis;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.health.HealthCheck;
import org.apache.camel.health.HealthCheckHelper;
import org.apache.camel.health.HealthCheckRegistry;
import org.apache.camel.health.HealthCheckRepository;
import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import static org.testcontainers.shaded.org.awaitility.Awaitility.await;

public class Kinesis2ConsumerHealthCheckProfileCredsIT extends CamelTestSupport {

@RegisterExtension
public static AWSService service = AWSServiceFactory.createSingletonS3Service();
public static AWSTestService service = AWSServiceFactory.createSingletonS3Service();

CamelContext context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@
*/
package org.apache.camel.component.aws2.kinesis;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.health.HealthCheck;
import org.apache.camel.health.HealthCheckHelper;
import org.apache.camel.health.HealthCheckRegistry;
import org.apache.camel.health.HealthCheckRepository;
import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import static org.testcontainers.shaded.org.awaitility.Awaitility.await;

public class Kinesis2ConsumerHealthCheckStaticCredsIT extends CamelTestSupport {

@RegisterExtension
public static AWSService service = AWSServiceFactory.createSingletonS3Service();
public static AWSTestService service = AWSServiceFactory.createSingletonS3Service();

CamelContext context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@
*/
package org.apache.camel.component.aws2.kinesis;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.health.HealthCheck;
import org.apache.camel.health.HealthCheckHelper;
import org.apache.camel.health.HealthCheckRegistry;
import org.apache.camel.health.HealthCheckRepository;
import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.MethodOrderer;
Expand All @@ -39,6 +36,9 @@
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.extension.RegisterExtension;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import static org.testcontainers.shaded.org.awaitility.Awaitility.await;

@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Flaky on GitHub Actions")
Expand All @@ -47,7 +47,7 @@
public class Kinesis2ConsumerHealthCustomClientIT extends CamelTestSupport {

@RegisterExtension
public static AWSService service = AWSServiceFactory.createSingletonS3Service();
public static AWSTestService service = AWSServiceFactory.createSingletonS3Service();

CamelContext context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@

package org.apache.camel.component.aws2.kinesis.integration;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;

import org.apache.camel.EndpointInject;
import org.apache.camel.Message;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.aws2.kinesis.Kinesis2Constants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.infra.aws.common.AWSCommon;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.infra.common.TestUtils;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.apache.camel.util.ObjectHelper;
Expand All @@ -42,6 +38,10 @@
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.services.kinesis.KinesisClient;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;

import static org.apache.camel.test.infra.aws2.clients.KinesisUtils.createStream;
import static org.apache.camel.test.infra.aws2.clients.KinesisUtils.putRecords;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -66,7 +66,7 @@ public String toString() {
}

@RegisterExtension
public static AWSService awsService = AWSServiceFactory.createSingletonKinesisService();
public static AWSTestService awsService = AWSServiceFactory.createSingletonKinesisService();

private static final Logger LOG = LoggerFactory.getLogger(KinesisProducerIT.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@

package org.apache.camel.component.aws2.kinesis.integration;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;

import org.apache.camel.EndpointInject;
import org.apache.camel.Message;
import org.apache.camel.builder.RouteBuilder;
Expand All @@ -31,9 +27,9 @@
import org.apache.camel.processor.resume.TransientResumeStrategy;
import org.apache.camel.resume.cache.ResumeCache;
import org.apache.camel.test.infra.aws.common.AWSCommon;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.aws2.services.AWSTestService;
import org.apache.camel.test.infra.common.TestUtils;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.apache.camel.util.ObjectHelper;
Expand All @@ -52,6 +48,10 @@
import software.amazon.awssdk.services.kinesis.model.PutRecordsResultEntry;
import software.amazon.awssdk.services.kinesis.model.ShardIteratorType;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;

import static org.apache.camel.test.infra.aws2.clients.KinesisUtils.createStream;
import static org.apache.camel.test.infra.aws2.clients.KinesisUtils.deleteStream;
import static org.apache.camel.test.infra.aws2.clients.KinesisUtils.putRecords;
Expand Down Expand Up @@ -113,7 +113,7 @@ public boolean evalEntry(Object shardId, Object sequenceNumber) {
}

@RegisterExtension
public static AWSService awsService = AWSServiceFactory.createSingletonKinesisService();
public static AWSTestService awsService = AWSServiceFactory.createSingletonKinesisService();

private static final Logger LOG = LoggerFactory.getLogger(KinesisProducerIT.class);

Expand Down
Loading

0 comments on commit ea8b20e

Please sign in to comment.