Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ name: aws-ddb-sink-delete-item-test
variables:
- name: "maxRetryAttempts"
value: "20"
- name: "aws.ddb.client.name"
value: "ddbDeleteItemClient"
- name: "aws.ddb.streams"
value: "false"
- name: "aws.ddb.tableName"
Expand All @@ -32,15 +34,13 @@ actions:
localstack:
services:
- "DYNAMODB"
options:
tables: '${aws.ddb.tableName}'
dynamodbClientName: 'ddbDeleteItemClient'
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-DDB client
- groovy:
script:
file: "aws/ddb/amazonDDBClient.groovy"

# Verify empty AWS-DDB
- createVariables:
variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ name: aws-ddb-sink-put-item-test
variables:
- name: "maxRetryAttempts"
value: "20"
- name: "aws.ddb.client.name"
value: "ddbPutItemClient"
- name: "aws.ddb.streams"
value: "false"
- name: "aws.ddb.tableName"
Expand All @@ -32,15 +34,13 @@ actions:
localstack:
services:
- "DYNAMODB"
options:
tables: '${aws.ddb.tableName}'
dynamodbClientName: 'ddbPutItemClient'
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-DDB client
- groovy:
script:
file: "aws/ddb/amazonDDBClient.groovy"

# Verify empty AWS-DDB
- createVariables:
variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
# ---------------------------------------------------------------------------

name: aws-ddb-sink-update-item-test
status: DISABLED
variables:
- name: "maxRetryAttempts"
value: "20"
- name: "aws.ddb.client.name"
value: "ddbUpdateItemClient"
- name: "aws.ddb.streams"
value: "false"
- name: "aws.ddb.tableName"
Expand All @@ -32,15 +35,13 @@ actions:
localstack:
services:
- "DYNAMODB"
options:
tables: '${aws.ddb.tableName}'
dynamodbClientName: 'ddbUpdateItemClient'
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-DDB client
- groovy:
script:
file: "aws/ddb/amazonDDBClient.groovy"

# Verify empty AWS-DDB
- createVariables:
variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ name: aws-ddb-source-test
variables:
- name: "maxRetryAttempts"
value: "20"
- name: "aws.ddb.client.name"
value: "ddbSourceItemClient"
- name: "aws.ddb.streams"
value: "true"
- name: "aws.ddb.tableName"
Expand All @@ -36,15 +38,13 @@ actions:
localstack:
services:
- "DYNAMODB"
options:
tables: '${aws.ddb.tableName}'
dynamodbClientName: 'ddbSourceItemClient'
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-DDB client
- groovy:
script:
file: "aws/ddb/amazonDDBClient.groovy"

# Create Camel JBang integration
- camel:
cli:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
*/

import org.citrusframework.exceptions.CitrusRuntimeException
import software.amazon.awssdk.services.dynamodb.DynamoDbClient
import software.amazon.awssdk.services.dynamodb.model.AttributeValue

var amazonDDBClient = context.getReferenceResolver().resolve("amazonDDBClient")
var amazonDDBClient = context.getReferenceResolver().resolve('${aws.ddb.client.name}', DynamoDbClient.class)

try {
def item = amazonDDBClient.getItem(b -> b.tableName('${aws.ddb.tableName}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
* limitations under the License.
*/


import software.amazon.awssdk.services.dynamodb.DynamoDbClient
import software.amazon.awssdk.services.dynamodb.model.AttributeValue
import software.amazon.awssdk.services.dynamodb.model.ReturnValue

var amazonDDBClient = context.getReferenceResolver().resolve("amazonDDBClient")
var amazonDDBClient = context.getReferenceResolver().resolve('${aws.ddb.client.name}', DynamoDbClient.class)

Map<String, AttributeValue> item = new HashMap<>()
item.put("id", AttributeValue.builder().n('${aws.ddb.item.id}').build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
*/

import org.citrusframework.exceptions.CitrusRuntimeException
import software.amazon.awssdk.services.dynamodb.DynamoDbClient

var amazonDDBClient = context.getReferenceResolver().resolve("amazonDDBClient")
var amazonDDBClient = context.getReferenceResolver().resolve('${aws.ddb.client.name}', DynamoDbClient.class)

try {
def items = amazonDDBClient.scan(b -> b.tableName('${aws.ddb.tableName}'))?.items()
def sorted = items.collect { new TreeMap(it) }
assert '${aws.ddb.items}' == sorted.toString()
assert sorted.toString() == '${aws.ddb.items}'
} catch (AssertionError e) {
throw new CitrusRuntimeException("AWS DDB item verification failed", e)
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@ actions:
localstack:
services:
- "KINESIS"
options:
streams: '${aws.kinesis.streamName}'
kinesisClientName: "kinesisSinkClient"
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-KINESIS client
- camel:
createComponent:
name: amazonKinesisClient
file: "aws/kinesis/amazonKinesisClient.groovy"

# Create Camel JBang integration
- camel:
cli:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ actions:
localstack:
services:
- "KINESIS"
options:
streams: '${aws.kinesis.streamName}'
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-KINESIS client
- camel:
createComponent:
name: amazonKinesisClient
file: "aws/kinesis/amazonKinesisClient.groovy"

# Create Camel JBang integration
- camel:
cli:
Expand All @@ -51,7 +47,7 @@ actions:

# Publish event
- send:
endpoint: camel:aws2-kinesis://${aws.kinesis.streamName}?amazonKinesisClient=#amazonKinesisClient
endpoint: camel:aws2-kinesis://${aws.kinesis.streamName}?amazonKinesisClient=#kinesisClient
message:
headers:
- name: CamelAwsKinesisPartitionKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ actions:
localstack:
services:
- "S3"
options:
buckets: '${aws.s3.bucketNameOrArn}'
s3ClientName: "s3SinkClient"
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-S3 client
- camel:
createComponent:
name: amazonS3Client
file: "aws/s3/amazonS3Client.groovy"

# Create Camel JBang integration
- camel:
cli:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ actions:
localstack:
services:
- "S3"
options:
buckets: '${aws.s3.bucketNameOrArn}'
s3ClientName: "amazonS3Client"
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-S3 client
- camel:
createComponent:
name: amazonS3Client
file: "aws/s3/amazonS3Client.groovy"

# Create Camel JBang integration
- camel:
cli:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ actions:
localstack:
services:
- "S3"
options:
buckets: '${aws.s3.bucketNameOrArn}'
- waitFor:
http:
url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"

# Create AWS-S3 client
- camel:
createComponent:
name: amazonS3Client
file: "aws/s3/amazonS3Client.groovy"

# Create Camel JBang integration
- camel:
cli:
Expand All @@ -65,7 +61,7 @@ actions:

# Publish event
- send:
endpoint: camel:aws2-s3://${aws.s3.bucketNameOrArn}?amazonS3Client=#amazonS3Client
endpoint: camel:aws2-s3://${aws.s3.bucketNameOrArn}?amazonS3Client=#s3Client
message:
headers:
- name: CamelAwsS3Key
Expand Down
Loading
Loading