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 Stream httpTests() { public Stream log() { return CitrusTestFactorySupport.factory(TestLoader.YAML).packageScan("log"); } + + @CitrusTestFactory + public Stream 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