This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 86024c079 chore: add Citrus test for counter-source (#2883)
86024c079 is described below
commit 86024c0799a3d9035b9ae1fa140120b41468ade2
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Jun 29 08:16:08 2026 +0200
chore: add Citrus test for counter-source (#2883)
counter-source carried camel.apache.org/kamelet.verified="true" but had
no behaviour test. Add a Citrus test that runs the counter-source ->
log-sink Pipe via Camel JBang and verifies the generated sequential
number reaches the sink, registering the new "counter" package in
CommonIT. Verified with: mvn verify -Dit.test=CommonIT#counter.
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
.../src/test/java/CommonIT.java | 5 +++
.../counter/counter-source-pipe.citrus.it.yaml | 33 ++++++++++++++++++
.../resources/counter/counter-source-pipe.yaml | 39 ++++++++++++++++++++++
3 files changed, 77 insertions(+)
diff --git a/tests/camel-kamelets-itest/src/test/java/CommonIT.java
b/tests/camel-kamelets-itest/src/test/java/CommonIT.java
index 27a1af47c..6c3351084 100644
--- a/tests/camel-kamelets-itest/src/test/java/CommonIT.java
+++ b/tests/camel-kamelets-itest/src/test/java/CommonIT.java
@@ -98,4 +98,9 @@ public class CommonIT {
public Stream<DynamicTest> log() {
return
CitrusTestFactorySupport.factory(TestLoader.YAML).packageScan("log");
}
+
+ @CitrusTestFactory
+ public Stream<DynamicTest> counter() {
+ return
CitrusTestFactorySupport.factory(TestLoader.YAML).packageScan("counter");
+ }
}
diff --git
a/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-pipe.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-pipe.citrus.it.yaml
new file mode 100644
index 000000000..0bafa7a21
--- /dev/null
+++
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-pipe.citrus.it.yaml
@@ -0,0 +1,33 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: counter-source-pipe-test
+actions:
+ # Run the counter-source -> log-sink Pipe via Camel JBang
+ - camel:
+ jbang:
+ run:
+ waitForRunningState: false
+ integration:
+ file: "counter/counter-source-pipe.yaml"
+
+ # Verify the generated sequential number reaches the log sink
+ - camel:
+ jbang:
+ verify:
+ integration: "counter-source-pipe"
+ logMessage: "777777"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-pipe.yaml
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-pipe.yaml
new file mode 100644
index 000000000..8a6c1c98c
--- /dev/null
+++
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-pipe.yaml
@@ -0,0 +1,39 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1
+kind: Pipe
+metadata:
+ name: counter-source-pipe
+spec:
+ source:
+ ref:
+ kind: Kamelet
+ apiVersion: camel.apache.org/v1
+ name: counter-source
+ properties:
+ period: 1000
+ start: 777777
+ numbers: 1
+ sink:
+ ref:
+ kind: Kamelet
+ apiVersion: camel.apache.org/v1
+ name: log-sink
+ properties:
+ loggerName: "test-counter-source"
+ showHeaders: false