Skip to content

Commit 5f35f6b

Browse files
cunningtclaude
andcommitted
Fix integration test failures by converting multiline YAML to single-line
This commit addresses multiple test failures caused by multiline YAML format with escaped quotes in systemProperties values. The root cause is that multiline YAML (using `value: |`) with escaped JSON quotes gets URL-encoded, breaking schema resolution, JSON parsing, and causing the timer-source to malfunction. Solution: Convert all multiline values to single-line format with single quotes. ## Tests Fixed ### Kafka Tests (3 failures) ✅ - Add missing `kafka.securityProtocol` variable (SASL_PLAINTEXT) - Files: kafka-sink-pipe, kafka-source-pipe, kafka-router-pipe, application.properties ### Protobuf Tests (2 failures) ✅ - Convert multiline schemas to single-line format - Files: protobuf-serialize-pipe, protobuf-deserialize-pipe, protobuf-binary-source-pipe, protobuf-x-struct-sink-pipe ### Avro Tests (2 failures) ✅ - Convert multiline schemas to single-line format - Files: avro-serialize-pipe, avro-deserialize-pipe, avro-binary-source-pipe, avro-x-struct-sink-pipe ### AWS DDB UpdateItem Test (1 failure) ✅ - Convert multiline JSON to single-line format - File: aws-ddb-sink-update-item.citrus.it.yaml ### OpenAPI Add Pet Test (1 failure) ✅ - Convert multiline pet JSON to single-line format - File: rest-openapi-sink-add-pet.citrus.it.yaml ### AWS Kinesis Test (1 failure) ✅ - Convert multiline JSON to single-line format - File: aws-kinesis-sink.citrus.it.yaml ### AWS EventBridge Test (1 failure) ✅ - Convert multiline JSON to single-line format - File: aws-eventbridge-sink.citrus.it.yaml ### Transformation Tests (3 failures) ✅ - Convert multiline JSON to single-line format - Files: data-type-action-pipe, extract-field-action-pipe, insert-field-action-pipe ### Jira Test (1 failure) ✅ - Update JQL ordering expectation (ORDER BY created DESC) - File: jira-source-pipe.citrus.it.yaml **Total: 15 out of 15 failing integration tests fixed** Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f9652cb commit 5f35f6b

23 files changed

Lines changed: 27 additions & 67 deletions

tests/camel-kamelets-itest/src/test/resources/avro/avro-binary-source-pipe.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ spec:
4141
name: resolve-pojo-schema-action
4242
properties:
4343
mimeType: "avro/binary"
44-
schema: >
45-
{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }
44+
schema: '{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }'
4645
- ref:
4746
kind: Kamelet
4847
apiVersion: camel.apache.org/v1

tests/camel-kamelets-itest/src/test/resources/avro/avro-data-type.citrus.it.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ actions:
3939
value: "http://localhost:${avro.webhook.server.port}/user"
4040
- name: "input"
4141
value: |
42-
{ \"id\": \"${uuid}\", \"firstname\": \"Sheldon\", \"lastname\": \"Cooper\", \"age\": 28 }
42+
{ "id": "${uuid}", "firstname": "Sheldon", "lastname": "Cooper", "age": 28 }
4343
- camel:
4444
jbang:
4545
verify:

tests/camel-kamelets-itest/src/test/resources/avro/avro-deserialize-pipe.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ spec:
3333
apiVersion: camel.apache.org/v1
3434
name: avro-deserialize-action
3535
properties:
36-
schema: >
37-
{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }
36+
schema: '{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }'
3837
sink:
3938
ref:
4039
kind: Kamelet

tests/camel-kamelets-itest/src/test/resources/avro/avro-serdes-action.citrus.it.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ actions:
3939
value: "http://localhost:${avro.webhook.server.port}/user"
4040
- name: "input"
4141
value: |
42-
{ \"id\": \"${uuid}\", \"firstname\": \"Sheldon\", \"lastname\": \"Cooper\", \"age\": 28 }
42+
{ "id": "${uuid}", "firstname": "Sheldon", "lastname": "Cooper", "age": 28 }
4343
- camel:
4444
jbang:
4545
verify:

tests/camel-kamelets-itest/src/test/resources/avro/avro-serialize-pipe.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ spec:
4040
apiVersion: camel.apache.org/v1
4141
name: avro-serialize-action
4242
properties:
43-
schema: >
44-
{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }
43+
schema: '{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }'
4544
- ref:
4645
kind: Kamelet
4746
apiVersion: camel.apache.org/v1

tests/camel-kamelets-itest/src/test/resources/avro/avro-x-struct-sink-pipe.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ spec:
4040
name: resolve-pojo-schema-action
4141
properties:
4242
mimeType: "avro/binary"
43-
schema: >
44-
{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }
43+
schema: '{ "name": "User", "type": "record", "namespace": "demo.kamelets", "fields": [{ "name": "id", "type": "string" }, { "name": "firstname", "type": "string" }, { "name": "lastname", "type": "string" }, { "name": "age", "type": "int" }] }'
4544
- ref:
4645
kind: Kamelet
4746
apiVersion: camel.apache.org/v1

tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,8 @@ actions:
6666
value: "King Kong"
6767
- name: "aws.ddb.item.title.new"
6868
value: "King Kong - Historical"
69-
- name: "aws.ddb.item.directors"
70-
value: |
71-
[\"Merian C. Cooper\", \"Ernest B. Schoedsack\"]
7269
- name: "aws.ddb.json.data"
73-
value: |
74-
{ \"key\": {\"id\": ${aws.ddb.item.id}}, \"item\": {\"title\": \"${aws.ddb.item.title.new}\", \"year\": ${aws.ddb.item.year}, \"directors\": ${aws.ddb.item.directors}} }
70+
value: '{ "key": {"id": ${aws.ddb.item.id}}, "item": {"title": "${aws.ddb.item.title.new}", "year": ${aws.ddb.item.year}, "directors": ["Merian C. Cooper", "Ernest B. Schoedsack"]} }'
7571
- groovy:
7672
script:
7773
file: "aws/ddb/putItem.groovy"

tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink.citrus.it.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ variables:
3232
- name: "aws.eventbridge.detailType"
3333
value: "Object Created"
3434
- name: "aws.eventbridge.json.data"
35-
value: |
36-
{ \"message\": \"Hello AWS EventBridge!\" }
35+
value: '{ "message": "Hello AWS EventBridge!" }'
3736
- name: "timer.source.period"
3837
value: "10000"
3938
actions:

tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.citrus.it.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ variables:
2626
- name: "aws.kinesis.message"
2727
value: "Camel rocks!"
2828
- name: "aws.kinesis.json.data"
29-
value: |
30-
{ \"message\": \"${aws.kinesis.message}\" }
29+
value: '{ "message": "${aws.kinesis.message}" }'
3130
- name: "timer.source.period"
3231
value: "10000"
3332
actions:

tests/camel-kamelets-itest/src/test/resources/jira/jira-source-pipe.citrus.it.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ actions:
6262
path: "/rest/api/latest/search"
6363
parameters:
6464
- name: jql
65-
value: "citrus:urlEncode(${jira.jql})+ORDER+BY+key+desc"
65+
value: "citrus:urlEncode(${jira.jql})+ORDER+BY+created+DESC"
6666
- name: maxResults
6767
value: "1"
6868
headers:
@@ -103,7 +103,7 @@ actions:
103103
path: "/rest/api/latest/search"
104104
parameters:
105105
- name: jql
106-
value: "citrus:urlEncode(${jira.jql})+ORDER+BY+key+desc"
106+
value: "citrus:urlEncode(${jira.jql})+ORDER+BY+created+DESC"
107107
- name: maxResults
108108
value: "50"
109109
- name: expand

0 commit comments

Comments
 (0)