This is an automated email from the ASF dual-hosted git repository.

oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new 47aca5850 chore: Re-enable DDB integration tests with Floci (#2923)
47aca5850 is described below

commit 47aca5850dc4e75812aaa0ee3aea8016ca76626e
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Jul 13 14:28:13 2026 +0200

    chore: Re-enable DDB integration tests with Floci (#2923)
    
    * 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) <[email protected]>
    Signed-off-by: Andrea Cosentino <[email protected]>
    
    * 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) <[email protected]>
    Signed-off-by: Andrea Cosentino <[email protected]>
    
    * fix: Disable DDB UpdateItem test — Floci does not apply updates
    
    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) <[email protected]>
    Signed-off-by: Andrea Cosentino <[email protected]>
    
    ---------
    
    Signed-off-by: Andrea Cosentino <[email protected]>
    Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
---
 ...rus.it.yaml.disabled => aws-ddb-sink-delete-item.citrus.it.yaml} | 4 ++--
 ...citrus.it.yaml.disabled => 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.disabled        | 2 +-
 ...source.citrus.it.yaml.disabled => aws-ddb-source.citrus.it.yaml} | 0
 .../camel-kamelets-itest/src/test/resources/aws/ddb/getItem.groovy  | 6 ++++--
 .../src/test/resources/aws/ddb/verifyItems.groovy                   | 4 +++-
 7 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.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)
 }

Reply via email to