diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml.disabled b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml similarity index 91% rename from tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml.disabled rename to tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml index e9ddacdc6..84d2bda86 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml.disabled +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml @@ -73,7 +73,7 @@ actions: - createVariables: variables: - name: "aws.ddb.items" - value: "[[title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year}), id:AttributeValue(N=${aws.ddb.item.id})]]" + value: "[[id:AttributeValue(N=${aws.ddb.item.id}), title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year})]]" - repeatOnError: until: "i > ${maxRetryAttempts}" actions: @@ -101,7 +101,7 @@ actions: - createVariables: variables: - name: "aws.ddb.items" - value: "[[title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year}), id:AttributeValue(N=${aws.ddb.item.id})]]" + value: "[[id:AttributeValue(N=${aws.ddb.item.id}), title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year})]]" - repeatOnError: until: "i > ${maxRetryAttempts}" actions: diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml.disabled b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml similarity index 95% rename from tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml.disabled rename to tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml index 83b85c5e3..d4d8b0b0b 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml.disabled +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml @@ -88,7 +88,7 @@ actions: - createVariables: variables: - name: "aws.ddb.item" - value: "[title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year}), id:AttributeValue(N=${aws.ddb.item.id})]" + value: "[id:AttributeValue(N=${aws.ddb.item.id}), title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year})]" - repeatOnError: until: "i > ${maxRetryAttempts}" actions: diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml index a1dbca82f..06ef96047 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml @@ -24,9 +24,7 @@ steps: - setBody: constant: "{{aws.ddb.json.data}}" - - log: - message: "${body}" - showHeaders: true + - log: "${body}" - to: uri: "kamelet:aws-ddb-sink" parameters: diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml.disabled b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml.disabled index d00e46924..b60964776 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml.disabled +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml.disabled @@ -78,7 +78,7 @@ actions: - createVariables: variables: - name: "aws.ddb.item" - value: "[title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year}), id:AttributeValue(N=${aws.ddb.item.id})]" + value: "[id:AttributeValue(N=${aws.ddb.item.id}), title:AttributeValue(S=${aws.ddb.item.title}), year:AttributeValue(N=${aws.ddb.item.year})]" - repeatOnError: until: "i > ${maxRetryAttempts}" actions: diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.citrus.it.yaml.disabled b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.citrus.it.yaml similarity index 100% rename from tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.citrus.it.yaml.disabled rename to tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-source.citrus.it.yaml diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/getItem.groovy b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/getItem.groovy index 9cee73d0b..e436dfa58 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/getItem.groovy +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/getItem.groovy @@ -21,8 +21,10 @@ import software.amazon.awssdk.services.dynamodb.model.AttributeValue var amazonDDBClient = context.getReferenceResolver().resolve("amazonDDBClient") try { - assert '${aws.ddb.item}' == amazonDDBClient.getItem(b -> b.tableName('${aws.ddb.tableName}') - .key(Collections.singletonMap("id", AttributeValue.builder().n('${aws.ddb.item.id}').build())))?.item()?.toString() + def item = amazonDDBClient.getItem(b -> b.tableName('${aws.ddb.tableName}') + .key(Collections.singletonMap("id", AttributeValue.builder().n('${aws.ddb.item.id}').build())))?.item() + + assert new TreeMap(item).toString() == '${aws.ddb.item}' } catch (AssertionError e) { throw new CitrusRuntimeException("AWS DDB item verification failed", e) } diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/verifyItems.groovy b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/verifyItems.groovy index 04868d405..7df226593 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/verifyItems.groovy +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/verifyItems.groovy @@ -20,7 +20,9 @@ import org.citrusframework.exceptions.CitrusRuntimeException var amazonDDBClient = context.getReferenceResolver().resolve("amazonDDBClient") try { - assert '${aws.ddb.items}' == amazonDDBClient.scan(b -> b.tableName('${aws.ddb.tableName}'))?.items()?.toListString() + def items = amazonDDBClient.scan(b -> b.tableName('${aws.ddb.tableName}'))?.items() + def sorted = items.collect { new TreeMap(it) } + assert '${aws.ddb.items}' == sorted.toString() } catch (AssertionError e) { throw new CitrusRuntimeException("AWS DDB item verification failed", e) }