davsclaus opened a new pull request, #3294:
URL: https://github.com/apache/camel-kamelets/pull/3294
These descriptions said something the Kamelet does not do. The mismatches
were found while writing the Citrus tests of #3261. Each fact below was checked
against a Citrus test, which this PR tightens where it did not check the fact
yet, or else against the template and the Camel component.
| Kamelet | What the description said | What it gives (verified by) | The
fix |
|---|---|---|---|
| `azure-cosmosdb-source` | JSON array "as bytes" | `InputStreamCache` (a
stream), `Content-Type: application/json` (`azure-cosmosdb-source-route` test)
| "as JSON text (a stream)", plus the `Content-Type` |
| `fhir-source`, `jira-oauth-source`, `telegram-source`, `solr-source`,
`github-commit-source`, `github-event-source`, `mariadb-source`,
`mysql-source`, `oracle-database-source`, `sqlserver-source` | "as JSON text" |
`InputStreamCache` (each Kamelet's own test asserts it) | "as JSON text (a
stream)" |
| `jira-source` | "as JSON text" | the same `marshal: json` step as
`jira-oauth-source` (its test only logs) | "as JSON text (a stream)" |
| `azure-storage-blob-event-based-source` (`getBlob`) | did not say which
headers the blob comes with | the `CamelAzureStorageBlob*` headers of the blob,
but no `CamelAzureStorageBlobBlobName` (test now asserts it is empty) | names
the headers, and says there is no name header |
| `google-storage-event-based-source` (`getObject`) | "with the
`CamelGoogleCloudStorage...` headers of the file" | no
`CamelGoogleCloudStorageObjectName` (the template removes it) and no bucket
name header; the name and bucket are in `objectId` / `bucketId` (test now
asserts this) | says so |
| `aws-ec2-sink` | "With Camel 4.23, the `instanceIds` header is ignored" |
the header selects the instance on 4.24, which the catalog targets
(`aws-ec2-sink-route` test: 2 instances, 1 in the header, 1 status returned) |
sentence removed |
| `smpp-source` | "the body is the text of the SMS" | data coding 4 gives a
`byte[]` (test now sends a second SMS with data coding 4); an
`AlertNotification` has no body (camel-smpp `SmppBinding`) | bytes for binary
SMS, `CamelSmppDataCoding`, alert notification |
| `jms-amqp-10-sink`, `jms-apache-artemis-sink`, `jms-ibm-mq-sink` | "the
message is unchanged" | adds `CamelJMSDestinationProduced` (the 3 tests now
assert it) | documents the header |
| `scp-sink` | "the message is unchanged" | adds `CamelFileNameProduced` =
`upload/day 1.csv` (test now asserts it) | documents the header |
| `azure-storage-files-sink` | "the message is unchanged" | adds
`CamelFileNameProduced` (no Citrus test; same `GenericFileProducer` as
`ftp-sink`, whose test asserts it) | documents the header |
| `ceph-sink` | "the body is unchanged" | adds `CamelAwsS3ETag`
(`ceph-sink-route` test asserts it) | documents the header |
| `pulsar-sink` | "The other headers are kept." | also adds
`CamelPulsarProducerMessageId` (test now asserts it) | documents the header |
| `aws-s3-streaming-upload-sink` | the completing message gets
`CamelAwsS3ETag` | also `CamelHttpResponseCode` = 200, which camel-aws2-s3 sets
on purpose (test now asserts `code=` and `code=200`) | documents the header |
| `solr-source` | no output headers | `CamelSolrOperation` (`SEARCH`),
`CamelSolrQueryString`, `CamelSolrCollection` stay on the message (test now
asserts them) | documents them |
| `redis-source` | only `CamelRedis.Channel` | also `CamelRedis.Pattern`, a
`byte[]` holding the channel (test now asserts it) | documents it, in the
description and in `dataTypes` (so `KameletsCatalogTest` now expects 2 headers)
|
| `infinispan-source` | only the `infinispan-*` / `ce-*` headers | the raw
`CamelInfinispanEventType`, `Key`, `CacheName`, `EntryVersion`,
`CommandRetried` headers remain too (test now asserts them) | documents them |
| `telegram-sink` | "the answer of Telegram as JSON text" | Camel's
`MessageResult` as JSON in a stream,
`{"ok":true,"message":{...},"result":false,...}` (`telegram-sink-route` test) |
describes `ok`, `message`, and the misleading `result` |
| `ibm-cos-sink` | `keyName`: "A `CamelIBMCOSKey` header ... is used instead
of it" | true only when `keyName` is set: without `keyName`, the template
overwrites the key from `file` / `ce-file` / a generated name (template, and
`IBMCOSProducer.determineKey`) | the option text and `Input:` say when the
header is used and when it is ignored |
Left alone, because the description is already right:
- `nominatim-geocode-action`: since #3278 (`out: json`) it already says
"JSON text, as bytes", and its test asserts `[B`.
- `aws-cloudtrail-source`: on today's Camel snapshot the body is `byte[]`,
because the `out: text` default runs after the consuming route. With
CAMEL-27258 (the source Kamelet output type is applied before the consuming
route, not merged yet) it becomes a `String`, so "JSON text" is right once that
fix lands.
- The other sinks that say "the message is unchanged"
(`aws-cloudwatch-sink`, `azure-eventhubs-sink`, `azure-servicebus-sink`, the
Jira sinks, `log-sink`, `nats-sink`, `slack-sink`, `splunk-hec-sink`,
`spring-rabbitmq-sink`) add no header. The AWS SQS / SNS / SES / Kinesis /
Firehose / S3 sinks, `ftp(s)-sink`, `sftp-sink`, `mail-sink` and `aws-ddb-sink`
already name the headers they add.
Not touched: `mongodb-changes-stream-source` has the same "JSON text" vs
stream mismatch, but #3283 is changing it.
**Overlap with open PRs:** `pulsar-sink` is also changed by the draft #3285.
This PR only appends to one sentence of its `Output:` paragraph.
`nominatim-geocode-action` (also in #3285) is not changed. #3287 changes the
labels of many of these files, not their descriptions.
**Tests:** run with `./mvnw -o verify -pl tests/camel-kamelets-itest`, for
`AwsIT#awsS3+awsEc2`, `MessagingIT#jms+pulsar+smpp`, `SearchIT#solr`,
`RedisIT#redis`, `InfinispanIT#infinispan`, `FileIT#ssh`,
`ServicesIT#telegram`, `GoogleCloudIT#google` and `AzureIT#azure`. All pass.
`jms-apache-artemis-sink` timed out once while its container started, then
passed on a rerun with the other JMS tests. `./mvnw clean install` passes, run
twice.
_Claude Code on behalf of Claus Ibsen_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]