Skip to content

chore: Add Citrus integration tests for 10 self-contained kamelets#2915

Merged
oscerd merged 2 commits into
mainfrom
chore/tier1-citrus-tests
Jul 9, 2026
Merged

chore: Add Citrus integration tests for 10 self-contained kamelets#2915
oscerd merged 2 commits into
mainfrom
chore/tier1-citrus-tests

Conversation

@oscerd

@oscerd oscerd commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Citrus integration tests for 10 kamelets that require no external services or containers. All tests use Camel route YAML format (per #2873) and leverage the existing CommonIT HTTP mock server and log verification infrastructure.

New tests

Kamelet Pattern What is verified
cron-source log-verify Emits configured message on cron schedule
set-body-action http-mock Message body replaced with configured value
delay-action http-mock Message passes through after configurable delay
throttle-action http-mock Message flows through rate limiter
simple-filter-action http-mock Non-matching message passes through (match = drop)
xj-identity-action http-mock + log JSON-to-XML identity transform
dns-ip-action log-verify localhost resolves to 127.0.0.1
regex-router-action log-verify Kafka topic header modified by regex
timestamp-router-action log-verify Kafka topic header gets timestamp prefix
topic-name-matches-filter-action log-verify Message with matching topic passes through

Files

  • 20 new files: 10 Camel route YAML definitions + 10 Citrus test YAML definitions across 7 test directories
  • 1 modified file: CommonIT.java — added 7 new @CitrusTestFactory methods

Test plan

  • mvn compile test-compile -pl :camel-kamelets-itest passes
  • mvn verify -pl :camel-kamelets-itest -Denable.integration.tests — all tests pass
  • No external services or containers required for these tests

Claude Code on behalf of Andrea Cosentino

🤖 Generated with Claude Code

Add Citrus integration tests for kamelets that require no external
services or containers, using the existing CommonIT HTTP mock and
log verification infrastructure:

- cron-source (log-verify: emits scheduled message)
- set-body-action (http-mock: replaces body)
- delay-action (http-mock: message passes through after delay)
- throttle-action (http-mock: message flows through rate limiter)
- simple-filter-action (http-mock: non-matching message passes)
- xj-identity-action (http-mock: JSON-to-XML transform)
- dns-ip-action (log-verify: localhost resolves to 127.0.0.1)
- regex-router-action (log-verify: Kafka topic regex replacement)
- timestamp-router-action (log-verify: topic gets timestamp prefix)
- topic-name-matches-filter-action (log-verify: matching topic passes)

All tests use Camel route YAML format per issue #2873.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd requested a review from christophd July 9, 2026 16:55
The Citrus HTTP sendResponse requires a nested `response:` element
with `status` and `reasonPhrase` properties, not a flat `status`
property directly under `sendResponse`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd merged commit 99d90a6 into main Jul 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant