davsclaus opened a new pull request, #3272: URL: https://github.com/apache/camel-kamelets/pull/3272
Part of #3261: Citrus tests for 17 of the 20 AWS Kamelets 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. The tests check what the Kamelet sent by reading it back from the service, with the Citrus S3, SQS and SNS clients or with the APIs of Floci. Where Floci does not emulate a service, or answers with a fixed stub, `awsSinkServer` stands in and answers in the AWS API format. The test then checks the request the Kamelet sent. | Kamelet | Backend | Body after the Kamelet | Also checked | |---|---|---|---| | `aws-cloudwatch-sink` | Floci | `String` | `GetMetricStatistics` gives Sum 3.0, Unit Count, dimension Shop=Rome | | `aws-ec2-sink` | Floci, two instances | `DescribeInstanceStatusResponse` | Only the instance in `instanceIds` comes back | | `aws-kinesis-firehose-sink` | Floci, stream into S3 | `String` | The S3 file holds the record | | `aws-s3-streaming-upload-sink` | Floci | `String` | The ETag comes only with the message that completes the file | | `aws-secrets-manager-sink` | Floci | `CreateSecretResponse` | `GetSecretValue` gives the body | | `aws-ses-sink` | Floci | `String` | From, to, subject and text, from `/_aws/ses` | | `aws-comprehend-sink` | Floci | `Collections$UnmodifiableRandomAccessList` | `DetectedLanguage` `en`, with its score | | `aws-sqs-batch-sink` | Floci | `SendMessageBatchResponse` | 3 successful, 0 failed | | `aws-sqs-fifo-sink`, `aws-sns-fifo-sink` | Floci (FIFO topic into FIFO queue) | `String` | `MessageGroupId` `customer-1` | | `aws-lambda-sink` | stand-in | `String` | Status 200. A second call answers `X-Amz-Function-Error`, which gives `FunctionError=Unhandled` | | `aws-polly-sink` | stand-in | `InputStreamCache` | The request JSON; `audio/mpeg` | | `aws-timestream-query-sink` | stand-in | `QueryResponse` | The query sent; rows and columns | | `aws-bedrock-text-sink`, `aws-bedrock-agent-sink`, `aws-bedrock-agent-runtime-sink` | stand-in | `String` | Model path, request body, ingestion job path, session ID and citations | | `aws-cloudtrail-source` | stand-in | `byte[]` | `LookupEvents` with the `EventSource` attribute, and the event headers | None sets `Content-Type`. The stand-in is used because: - **Lambda:** Floci runs the functions in Docker, which it cannot reach from inside its container. - **Polly and Timestream:** Floci does not emulate them. - **Bedrock:** Floci answers every model with the same stub, or has only AgentCore. - **CloudTrail:** Floci's `LookupEvents` returns no events. `aws-lambda-sink` and `aws-secrets-manager-sink` have no `uriEndpointOverride`. The tests point them at Floci or at the stand-in with the `AWS_ENDPOINT_URL_LAMBDA` and `AWS_ENDPOINT_URL_SECRETS_MANAGER` environment variables of the integration. ### Not covered - **`aws-translate-action`:** AWS SDK 2.57 sends Translate as Smithy RPC v2 CBOR, which Floci does not take and the Citrus server cannot answer. - **`aws-redshift-sink` and `aws-redshift-source`:** the Redshift JDBC driver does not connect to PostgreSQL 17, and no emulator speaks the Redshift protocol. ### Findings, no Kamelet bugs - **`aws-cloudtrail-source`** says the body is "the CloudTrail record of the event, as JSON text". It is the JSON as `byte[]`, as the component sets it. The description, or a #3117 data type, should say so. - **`aws-ec2-sink`** says that with Camel 4.23 the `instanceIds` header is ignored. On 4.24.0-SNAPSHOT it works. - **`aws-lambda-sink`, `aws-secrets-manager-sink` and `aws-translate-action`** have no `uriEndpointOverride`, unlike the other AWS Kamelets. ### Tests `AwsIT`: 34 of 34 pass (17 new and 17 existing), in two runs. The Firehose wait uses `repeatOnError`, without `Thread.sleep`. `./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]
