From be2087909f64aced407e8b23290031bbf1db39d8 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Jul 2026 11:26:05 +0200 Subject: [PATCH 1/3] chore: Re-enable DDB integration tests with Floci The DDB tests were disabled in #2872 because UpdateItem and DeleteItem operations failed against LocalStack. Now that the test suite uses Floci as the AWS emulator (configured via citrus-application.properties), re-enable all 4 DDB tests to verify Floci's DynamoDB support. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Andrea Cosentino --- ...s.it.yaml.disabled => aws-ddb-sink-delete-item.citrus.it.yaml} | 0 ...trus.it.yaml.disabled => aws-ddb-sink-put-item.citrus.it.yaml} | 0 ...s.it.yaml.disabled => aws-ddb-sink-update-item.citrus.it.yaml} | 0 ...urce.citrus.it.yaml.disabled => aws-ddb-source.citrus.it.yaml} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename tests/camel-kamelets-itest/src/test/resources/aws/ddb/{aws-ddb-sink-delete-item.citrus.it.yaml.disabled => aws-ddb-sink-delete-item.citrus.it.yaml} (100%) rename tests/camel-kamelets-itest/src/test/resources/aws/ddb/{aws-ddb-sink-put-item.citrus.it.yaml.disabled => aws-ddb-sink-put-item.citrus.it.yaml} (100%) rename tests/camel-kamelets-itest/src/test/resources/aws/ddb/{aws-ddb-sink-update-item.citrus.it.yaml.disabled => aws-ddb-sink-update-item.citrus.it.yaml} (100%) rename tests/camel-kamelets-itest/src/test/resources/aws/ddb/{aws-ddb-source.citrus.it.yaml.disabled => aws-ddb-source.citrus.it.yaml} (100%) 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 100% 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 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 100% 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 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 similarity index 100% rename from tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml.disabled rename to tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml 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 From 37cbdcc39bd4448edece4d799066f50f0c2d8b20 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Jul 2026 12:04:12 +0200 Subject: [PATCH 2/3] fix: Fix DDB test failures with Floci - Fix sink route YAML: use simple log syntax (log: "${body}") instead of expanded form (log: message:) which Camel JBang rejects - Fix attribute ordering in assertions: Floci returns DynamoDB attributes in different order than LocalStack. Use TreeMap in Groovy scripts and sort expected values alphabetically in Citrus tests Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Andrea Cosentino --- .../aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml | 4 ++-- .../resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml | 2 +- .../src/test/resources/aws/ddb/aws-ddb-sink-route.yaml | 4 +--- .../aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml | 2 +- .../src/test/resources/aws/ddb/getItem.groovy | 6 ++++-- .../src/test/resources/aws/ddb/verifyItems.groovy | 4 +++- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml b/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 +++ 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 b/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 +++ 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 b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml index d00e46924..b60964776 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml @@ -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/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) } From bd1eb37f783041e674b64034e8a3d43bf3c1ba80 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Jul 2026 12:45:21 +0200 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20Disable=20DDB=20UpdateItem=20test=20?= =?UTF-8?q?=E2=80=94=20Floci=20does=20not=20apply=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The UpdateItem operation runs without error but Floci's DynamoDB emulation does not actually apply the attribute changes: the item retains its original values after the update. PutItem, DeleteItem, and DDB Streams source all pass. Disable UpdateItem until Floci adds full UpdateItem support. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Andrea Cosentino --- ...s.it.yaml => aws-ddb-sink-update-item.citrus.it.yaml.disabled} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/camel-kamelets-itest/src/test/resources/aws/ddb/{aws-ddb-sink-update-item.citrus.it.yaml => aws-ddb-sink-update-item.citrus.it.yaml.disabled} (100%) diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml.disabled similarity index 100% rename from tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml rename to tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml.disabled