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 1a4751033 fix(itest): make the DynamoDB update-item and mail sink
tests pass on Camel 4.23 and 4.24 (#3132)
1a4751033 is described below
commit 1a475103327fa68a75605c9f717048dfe368153e
Author: James Netherton <[email protected]>
AuthorDate: Mon Nov 16 13:25:50 2026 +0000
fix(itest): make the DynamoDB update-item and mail sink tests pass on Camel
4.23 and 4.24 (#3132)
* fix(itest): compare the DynamoDB String Set of the update-item test in
any order
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(itest): accept a charset in the content type of the mail sink test
Camel 4.24 sends text/plain; charset=UTF-8 (CAMEL-26013).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml | 3 ++-
.../camel-kamelets-itest/src/test/resources/aws/ddb/getItem.groovy | 7 ++++++-
.../src/test/resources/mail/mail-sink-route.citrus.it.yaml | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
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 ab294112a..e67199240 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
@@ -105,8 +105,9 @@ actions:
# Verify Kamelet sink
- createVariables:
variables:
+ # sorted, see getItem.groovy
- name: "aws.ddb.item.directors"
- value: "[Merian C. Cooper, Ernest B. Schoedsack]"
+ value: "[Ernest B. Schoedsack, Merian C. Cooper]"
- name: "aws.ddb.item"
value: "[directors:AttributeValue(SS=${aws.ddb.item.directors}),
id:AttributeValue(N=${aws.ddb.item.id}),
title:AttributeValue(S=${aws.ddb.item.title.new}),
year:AttributeValue(N=${aws.ddb.item.year})]"
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 e0c3a75e0..1291a5db4 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
@@ -25,7 +25,12 @@ try {
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}'
+ // DynamoDB sets have no order: sort them so the expected value can list
them sorted
+ def normalized = new TreeMap(item.collectEntries { name, value ->
+ [(name): value.hasSs() ?
value.toBuilder().ss(value.ss().toSorted()).build() : value]
+ })
+
+ assert normalized.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/mail/mail-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/mail/mail-sink-route.citrus.it.yaml
index 8fb83f688..5b7f5a628 100644
---
a/tests/camel-kamelets-itest/src/test/resources/mail/mail-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/mail/mail-sink-route.citrus.it.yaml
@@ -67,7 +67,7 @@ actions:
"to": "${mail.to}",
"subject": "${mail.subject}",
"body": {
- "contentType": "text/plain",
+ "contentType": "@startsWith('text/plain')@",
"content": "${mail.message}",
}
}