This is an automated email from the ASF dual-hosted git repository.

acosentino 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 a3252dda chore: Fix YAKS tests for 4.4.0-SNAPSHOT (#1863)
a3252dda is described below

commit a3252dda945b31f188ea586ebc44cea72d4b9c45
Author: Christoph Deppisch <cdeppi...@redhat.com>
AuthorDate: Thu Feb 1 06:40:30 2024 +0100

    chore: Fix YAKS tests for 4.4.0-SNAPSHOT (#1863)
    
    - Update Apache Camel runtime to 4.4.0-SNAPSHOT
    - Use CitrusObjectFactory instead of CitrusSpringObjectFactory as the 
latter one has open issues
    - Set timer period to 10000
---
 tests/camel-kamelets-itest/pom.xml                             |  2 +-
 tests/camel-kamelets-itest/src/test/java/KameletsYaksIT.java   |  5 -----
 .../src/test/resources/avro-binary-source-pipe.yaml            |  2 +-
 .../src/test/resources/avro-serialize-pipe.yaml                |  2 +-
 .../src/test/resources/aws-s3-to-http.yaml                     |  7 +++++++
 .../src/test/resources/aws/s3/aws-s3-to-http.feature           |  2 +-
 .../src/test/resources/citrus-application.properties           |  2 +-
 .../src/test/resources/cucumber.properties                     |  2 +-
 .../src/test/resources/data-type-action-pipe.yaml              |  2 +-
 .../src/test/resources/extract-field-action-pipe.yaml          |  2 +-
 .../src/test/resources/insert-field-action-pipe.yaml           |  2 +-
 .../src/test/resources/kafka-sink-pipe.yaml                    |  2 +-
 .../resources/{timer-to-http.yaml => timer-to-http-pipe.yaml}  |  3 ++-
 .../src/test/resources/timer-to-http.groovy                    |  2 +-
 .../src/test/resources/timer/timer-source.feature              | 10 +++++-----
 .../src/test/resources/timer/timer-to-http.feature             |  1 +
 .../src/test/resources/timer/yaks-config.yaml                  |  2 +-
 17 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/tests/camel-kamelets-itest/pom.xml 
b/tests/camel-kamelets-itest/pom.xml
index 8158138c..2079a00f 100644
--- a/tests/camel-kamelets-itest/pom.xml
+++ b/tests/camel-kamelets-itest/pom.xml
@@ -59,7 +59,7 @@
         </dependency>
         <dependency>
             <groupId>io.cucumber</groupId>
-            <artifactId>cucumber-spring</artifactId>
+            <artifactId>cucumber-java</artifactId>
             <version>${cucumber.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/tests/camel-kamelets-itest/src/test/java/KameletsYaksIT.java 
b/tests/camel-kamelets-itest/src/test/java/KameletsYaksIT.java
index deb5875b..50b80bb0 100644
--- a/tests/camel-kamelets-itest/src/test/java/KameletsYaksIT.java
+++ b/tests/camel-kamelets-itest/src/test/java/KameletsYaksIT.java
@@ -17,13 +17,8 @@
 
 import io.cucumber.junit.Cucumber;
 import io.cucumber.junit.CucumberOptions;
-import io.cucumber.spring.CucumberContextConfiguration;
-import org.citrusframework.config.CitrusSpringConfig;
 import org.junit.runner.RunWith;
-import org.springframework.test.context.ContextConfiguration;
 
-@CucumberContextConfiguration
-@ContextConfiguration(classes = CitrusSpringConfig.class)
 @RunWith(Cucumber.class)
 @CucumberOptions(
         extraGlue = "org.citrusframework.yaks",
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/avro-binary-source-pipe.yaml 
b/tests/camel-kamelets-itest/src/test/resources/avro-binary-source-pipe.yaml
index adc3ab27..376a3be8 100644
--- a/tests/camel-kamelets-itest/src/test/resources/avro-binary-source-pipe.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/avro-binary-source-pipe.yaml
@@ -29,7 +29,7 @@ spec:
       apiVersion: camel.apache.org/v1
       name: timer-source
     properties:
-      period: 5000
+      period: 10000
       contentType: application/json
       message: >
         ${user}
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/avro-serialize-pipe.yaml 
b/tests/camel-kamelets-itest/src/test/resources/avro-serialize-pipe.yaml
index 5d18e178..63495904 100644
--- a/tests/camel-kamelets-itest/src/test/resources/avro-serialize-pipe.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/avro-serialize-pipe.yaml
@@ -26,7 +26,7 @@ spec:
       apiVersion: camel.apache.org/v1
       name: timer-source
     properties:
-      period: 5000
+      period: 10000
       contentType: application/json
       message: >
         ${user}
diff --git a/tests/camel-kamelets-itest/src/test/resources/aws-s3-to-http.yaml 
b/tests/camel-kamelets-itest/src/test/resources/aws-s3-to-http.yaml
index 702f8718..5135f448 100644
--- a/tests/camel-kamelets-itest/src/test/resources/aws-s3-to-http.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/aws-s3-to-http.yaml
@@ -51,6 +51,13 @@ spec:
       properties:
         scheme: "http"
         format: "application-cloudevents"
+    - ref:
+        kind: Kamelet
+        apiVersion: camel.apache.org/v1
+        name: data-type-action
+      properties:
+        scheme: "text"
+        format: "plain"
     - ref:
         kind: Kamelet
         apiVersion: camel.apache.org/v1
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-to-http.feature 
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-to-http.feature
index 67549261..f040b30e 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-to-http.feature
+++ 
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-to-http.feature
@@ -38,7 +38,7 @@ Feature: AWS S3 Source - Http sink
       | ce-source      | aws.s3.bucket.${aws.s3.bucketNameOrArn} |
       | ce-type        | org.apache.camel.event.aws.s3.getObject |
       | ce-time        | @notEmpty()@ |
-      | Content-Type   | application/json;charset=UTF-8 |
+      | Content-Type   | text/plain; charset=UTF-8 |
     When receive POST /incoming
     Then send HTTP 201 CREATED
 
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties 
b/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties
index b4e36948..19991c7c 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties
+++ 
b/tests/camel-kamelets-itest/src/test/resources/citrus-application.properties
@@ -8,7 +8,7 @@ citrus.type.converter=camel
 yaks.cluster.type=local
 yaks.camelk.max.attempts=10
 
-yaks.jbang.camel.version=4.3.0
+yaks.jbang.camel.version=4.4.0-SNAPSHOT
 yaks.jbang.kamelets.version=4.4.0-SNAPSHOT
 
 yaks.jbang.kamelets.local.dir=../../../kamelets
diff --git a/tests/camel-kamelets-itest/src/test/resources/cucumber.properties 
b/tests/camel-kamelets-itest/src/test/resources/cucumber.properties
index 4a022c94..91707f3c 100644
--- a/tests/camel-kamelets-itest/src/test/resources/cucumber.properties
+++ b/tests/camel-kamelets-itest/src/test/resources/cucumber.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-cucumber.object-factory=org.citrusframework.cucumber.backend.spring.CitrusSpringObjectFactory
+cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory
 cucumber.publish.quiet=true
 
 cucumber.filter.tags=not @ignored and not @knative
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/data-type-action-pipe.yaml 
b/tests/camel-kamelets-itest/src/test/resources/data-type-action-pipe.yaml
index 3abac977..06a2b175 100644
--- a/tests/camel-kamelets-itest/src/test/resources/data-type-action-pipe.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/data-type-action-pipe.yaml
@@ -29,7 +29,7 @@ spec:
       apiVersion: camel.apache.org/v1
       name: timer-source
     properties:
-      period: 5000
+      period: 10000
       contentType: application/json
       message: >
         ${input}
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/extract-field-action-pipe.yaml 
b/tests/camel-kamelets-itest/src/test/resources/extract-field-action-pipe.yaml
index a99654c1..362a8039 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/extract-field-action-pipe.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/extract-field-action-pipe.yaml
@@ -26,7 +26,7 @@ spec:
       apiVersion: camel.apache.org/v1
       name: timer-source
     properties:
-      period: 5000
+      period: 10000
       contentType: application/json
       message: >
         ${input}
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/insert-field-action-pipe.yaml 
b/tests/camel-kamelets-itest/src/test/resources/insert-field-action-pipe.yaml
index 2b490ee6..12a13686 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/insert-field-action-pipe.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/insert-field-action-pipe.yaml
@@ -26,7 +26,7 @@ spec:
       apiVersion: camel.apache.org/v1
       name: timer-source
     properties:
-      period: 5000
+      period: 10000
       contentType: application/json
       message: >
         ${input}
diff --git a/tests/camel-kamelets-itest/src/test/resources/kafka-sink-pipe.yaml 
b/tests/camel-kamelets-itest/src/test/resources/kafka-sink-pipe.yaml
index ace2dfa5..32a98c4c 100644
--- a/tests/camel-kamelets-itest/src/test/resources/kafka-sink-pipe.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/kafka-sink-pipe.yaml
@@ -26,7 +26,7 @@ spec:
       apiVersion: camel.apache.org/v1
       name: timer-source
     properties:
-      period: 5000
+      period: 10000
       contentType: application/json
       message: ${message}
   sink:
diff --git a/tests/camel-kamelets-itest/src/test/resources/timer-to-http.yaml 
b/tests/camel-kamelets-itest/src/test/resources/timer-to-http-pipe.yaml
similarity index 96%
rename from tests/camel-kamelets-itest/src/test/resources/timer-to-http.yaml
rename to tests/camel-kamelets-itest/src/test/resources/timer-to-http-pipe.yaml
index 5ccfad21..e57b14b5 100644
--- a/tests/camel-kamelets-itest/src/test/resources/timer-to-http.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/timer-to-http-pipe.yaml
@@ -18,7 +18,7 @@
 apiVersion: camel.apache.org/v1
 kind: Pipe
 metadata:
-  name: timer-to-http
+  name: timer-to-http-pipe
 spec:
   source:
     ref:
@@ -26,6 +26,7 @@ spec:
       apiVersion: camel.apache.org/v1
       name: timer-source
     properties:
+      period: 10000
       message: "${message}"
   sink:
     uri: yaks:resolveURL('test-service')/events
diff --git a/tests/camel-kamelets-itest/src/test/resources/timer-to-http.groovy 
b/tests/camel-kamelets-itest/src/test/resources/timer-to-http.groovy
index 6b0c86a0..e1a184d4 100644
--- a/tests/camel-kamelets-itest/src/test/resources/timer-to-http.groovy
+++ b/tests/camel-kamelets-itest/src/test/resources/timer-to-http.groovy
@@ -18,7 +18,7 @@
 
 // camel-k: language=groovy
 
-from('timer:tick?period=5000')
+from('timer:tick?period=10000')
     .setHeader("CamelHttpMethod", constant("PUT"))
     .setBody().constant('{{message}}')
     .to('yaks:resolveURL(test-service)/messages')
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/timer/timer-source.feature 
b/tests/camel-kamelets-itest/src/test/resources/timer/timer-source.feature
index 2b6d2bdc..ae38394a 100644
--- a/tests/camel-kamelets-itest/src/test/resources/timer/timer-source.feature
+++ b/tests/camel-kamelets-itest/src/test/resources/timer/timer-source.feature
@@ -28,10 +28,10 @@ Feature: Timer Source Kamelet
   Scenario: Create Kamelet binding
     And variables
       | message  | Hello World |
-    Given load Pipe timer-to-http.yaml
-    Then Pipe timer-to-http should be available
-    Then Camel K integration timer-to-http should be running
-    And Camel K integration timer-to-http should print Routes startup
+    Given load Pipe timer-to-http-pipe.yaml
+    Then Pipe timer-to-http-pipe should be available
+    Then Camel K integration timer-to-http-pipe should be running
+    And Camel K integration timer-to-http-pipe should print Routes startup
 
   Scenario: Verify binding
     Given expect HTTP request body: Hello World
@@ -39,5 +39,5 @@ Feature: Timer Source Kamelet
     Then send HTTP 200 OK
 
   Scenario: Remove Camel K resources
-    Given delete Pipe timer-to-http
+    Given delete Pipe timer-to-http-pipe
     And delete Kubernetes service test-service
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/timer/timer-to-http.feature 
b/tests/camel-kamelets-itest/src/test/resources/timer/timer-to-http.feature
index af816d4c..ccfeb09a 100644
--- a/tests/camel-kamelets-itest/src/test/resources/timer/timer-to-http.feature
+++ b/tests/camel-kamelets-itest/src/test/resources/timer/timer-to-http.feature
@@ -27,3 +27,4 @@ Feature: Verify Camel K integrations
 
   Scenario: Remove Camel K resources
     Given delete Camel K integration timer-to-http
+    And delete Kubernetes service test-service
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/timer/yaks-config.yaml 
b/tests/camel-kamelets-itest/src/test/resources/timer/yaks-config.yaml
index 41970bbc..76ff59a6 100644
--- a/tests/camel-kamelets-itest/src/test/resources/timer/yaks-config.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/timer/yaks-config.yaml
@@ -33,7 +33,7 @@ config:
         - name: INTEGRATION_LOGS
           level: INFO
     resources:
-      - ../timer-to-http.yaml
+      - ../timer-to-http-pipe.yaml
       - ../timer-to-http.groovy
       - ../timer-to-http.properties
   dump:

Reply via email to