davsclaus opened a new pull request, #3277:
URL: https://github.com/apache/camel-kamelets/pull/3277
Part of #3261: Citrus tests for 11 of the 14 Kamelets for hosted services
that had none. As in #3262, each route records the body type (`X-Body-Type`)
and the `Content-Type` (`X-Content-Type`) the Kamelet gives, for #3117.
| Kamelet | How it is checked | Body after the Kamelet |
|---|---|---|
| `fhir-source`, `fhir-sink` | HAPI FHIR (`hapiproject/hapi:v8.12.0-2`, the
tag Camel's own FHIR tests use). A Patient is created, searched, and read back
| `InputStreamCache`, `application/fhir+json` / `MethodOutcome` |
| `jira-oauth-source` | Citrus stands in for Jira. The OAuth 1 RSA key is
generated at test time, so no private key is committed | `InputStreamCache`,
`application/json` |
| `jira-transition-issue-sink`, `jira-update-issue-sink` | The stand-in
checks the transition and update requests. A `CamelJiraIssueTransitionId` or
`CamelJiraIssueTypeId` set before the Kamelet is removed by it | `String`,
unchanged |
| `telegram-source`, `telegram-sink` | The stand-in, set with
`camel.component.telegram.baseUri`. The source's next poll uses the right
`offset`. The sink sends a text and a photo (`image/png`) | `InputStreamCache`,
`application/json` |
| `ibm-cos-source`, `ibm-cos-sink` | Floci S3, with a `cosClient` bean using
HMAC keys | `InputStreamCache` / `String` |
| `snmp-source` | `polinux/snmpd` over TCP, SNMP v1 | `String`, the
`<snmp><entry>` XML |
| `salesforce-composite-upsert-sink` | The stand-in checks the OAuth token
login and the composite `PATCH` | a `List` of `UpsertSObjectResult` |
- **IBM COS login:** the IAM token endpoint is a constant in the IBM COS
SDK, so the test gives its own client with HMAC keys. The key, header and ETag
handling of the templates is checked, but not the `apiKey` login.
- **New test class:** `ServicesIT`, with its own HTTP server, for the
packages `fhir`, `telegram`, `ibmcos`, `snmp` and `salesforce`. The three Jira
tests run in `JiraIT`.
### Not covered
- **`ibm-watson-language-sink`:** its IAM token URL is fixed, with no option
to change it.
- **`salesforce-source`:** it needs a CometD long-polling stand-in, which a
Citrus server cannot answer in order.
- **`salesforce-pubsub-source`:** it uses gRPC.
### Findings
- **Camel bug: the Salesforce Kamelets do not start with Camel JBang
4.24.0-SNAPSHOT.** They fail with `NoClassDefFoundError:
com/google/protobuf/RuntimeVersion$RuntimeDomain`. camel-salesforce gets
`protobuf-java` 3.25 through gRPC, but its generated Pub/Sub classes need 4.x.
The test adds `--dep=com.google.protobuf:protobuf-java:4.35.1`, with a comment
saying why.
- **`telegram-sink`** says the body afterwards is "the answer of Telegram as
JSON text". It is Camel's `MessageResult` written as JSON
(`{"description":null,...,"ok":true,"result":false}`), not Telegram's answer,
and `"result":false` is misleading.
- **`fhir-source`, `jira-oauth-source` and the Telegram Kamelets** give
"JSON text" as a stream (`InputStreamCache`).
### Tests
`JiraIT` and `ServicesIT`: 14 of 14 pass (11 new tests and 3 existing ones),
in two runs, with the `mirror.gcr.io` mirror on, as in CI. `./mvnw clean
verify` from the root passes.
_Claude Code on behalf of Claus Ibsen_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]