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

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 489f42ede (#5489) Migrate groovy => yaml for ./e2e/knative
489f42ede is described below

commit 489f42ede99ccd91b64bb9efdc28e9593d3770f0
Author: Thomas Diesler <tdies...@redhat.com>
AuthorDate: Tue Jun 11 10:41:54 2024 +0200

    (#5489) Migrate groovy => yaml for ./e2e/knative
---
 docs/modules/ROOT/pages/contributing/e2e.adoc      |  4 ++-
 e2e/common/languages/files/yaml-polyglot.yaml      |  2 ++
 e2e/common/languages/files/yaml.yaml               |  2 ++
 e2e/knative/files/flow.yaml                        |  3 +-
 e2e/knative/files/http_out.groovy                  | 18 ----------
 e2e/knative/files/{flow.yaml => http_out.yaml}     |  7 ++--
 e2e/knative/files/knative1.groovy                  | 27 ---------------
 e2e/knative/files/{yaml.yaml => knative1.yaml}     | 25 +++++++++-----
 e2e/knative/files/knative2.groovy                  | 19 ----------
 e2e/knative/files/{flow.yaml => knative2.yaml}     |  6 ++--
 e2e/knative/files/knative3.groovy                  | 19 ----------
 e2e/knative/files/{flow.yaml => knative3.yaml}     |  6 ++--
 e2e/knative/files/knative_broker_receiver.groovy   | 22 ------------
 e2e/knative/files/knative_broker_sender.groovy     | 24 -------------
 e2e/knative/files/knativech1.groovy                | 20 -----------
 e2e/knative/files/{flow.yaml => knativech1.yaml}   |  7 ++--
 e2e/knative/files/knativech2.groovy                | 19 ----------
 e2e/knative/files/{flow.yaml => knativech2.yaml}   |  7 ++--
 e2e/knative/files/knativeevt1.groovy               | 24 -------------
 e2e/knative/files/{yaml.yaml => knativeevt1.yaml}  | 19 +++++-----
 e2e/knative/files/knativeevt2.groovy               | 22 ------------
 e2e/knative/files/{flow.yaml => knativeevt2.yaml}  | 12 ++++---
 e2e/knative/files/knativegetpost1.groovy           | 21 ------------
 .../files/{yaml.yaml => knativegetpost1.yaml}      | 15 ++++----
 e2e/knative/files/knativegetpost2.groovy           | 19 ----------
 .../files/{flow.yaml => knativegetpost2.yaml}      |  7 ++--
 e2e/knative/files/knativemultihop1.groovy          | 24 -------------
 .../files/{yaml.yaml => knativemultihop1.yaml}     | 19 +++++-----
 e2e/knative/files/knativemultihop2.groovy          | 21 ------------
 .../files/{flow.yaml => knativemultihop2.yaml}     |  8 +++--
 e2e/knative/files/knativemultihop3.groovy          | 24 -------------
 .../files/{yaml.yaml => knativemultihop3.yaml}     | 19 +++++-----
 e2e/knative/files/petstore.groovy                  | 29 ----------------
 e2e/knative/files/{yaml.yaml => petstore.yaml}     | 25 ++++++++++----
 e2e/knative/files/podtest-knative1.groovy          | 21 ------------
 .../files/{flow.yaml => podtest-knative1.yaml}     |  8 +++--
 e2e/knative/files/podtest-knative2.groovy          | 19 ----------
 .../files/{flow.yaml => podtest-knative2.yaml}     |  6 ++--
 e2e/knative/files/test-kamelet-display.groovy      | 20 -----------
 .../files/{flow.yaml => test-kamelet-display.yaml} |  7 ++--
 e2e/knative/files/yaml.yaml                        |  1 +
 e2e/knative/kamelet_test.go                        |  2 +-
 .../{knative_test.go => knative_pipes_test.go}     | 40 ++++++++++------------
 e2e/knative/openapi_test.go                        |  2 +-
 e2e/knative/pod_test.go                            |  4 +--
 45 files changed, 151 insertions(+), 524 deletions(-)

diff --git a/docs/modules/ROOT/pages/contributing/e2e.adoc 
b/docs/modules/ROOT/pages/contributing/e2e.adoc
index 91b81d6bd..68a0bc281 100644
--- a/docs/modules/ROOT/pages/contributing/e2e.adoc
+++ b/docs/modules/ROOT/pages/contributing/e2e.adoc
@@ -24,7 +24,9 @@ The test script will install the operators needed in a random 
namespace, execute
 [[testing-e2e-structure]]
 == End-To-End tests structure
 
-We have several kind of end-to-end tests. Most of them will only require the 
installation of Camel K operator, but, others need some particular 
configuration. This is the reason why they may not work out of the box on your 
cluster. The main goal of the test is to run in a CI environment, so, all 
requirements are scripted accordingly. If you want to run a test in your 
cluster, make sure to provide the configuration as expected by the test suite.
+We have several groups of end-to-end tests. Most of them will only require the 
installation of Camel K operator, but, others need some particular 
configuration. This is the reason why they may not work out of the box on your 
cluster. The main goal of the test is to run in a CI environment, so, all 
requirements are scripted accordingly. If you want to run a test in your 
cluster, make sure to provide the configuration as expected by the test suite.
+
+There may be a `files/setup.sh` script in some groups (e.g. knative) that can 
help to get the required configuration in place.
 
 This is the list of the groups we are using (please, notice that they can 
slightly change in the future):
 
diff --git a/e2e/common/languages/files/yaml-polyglot.yaml 
b/e2e/common/languages/files/yaml-polyglot.yaml
index 6ba033229..c835c43c2 100644
--- a/e2e/common/languages/files/yaml-polyglot.yaml
+++ b/e2e/common/languages/files/yaml-polyglot.yaml
@@ -1,3 +1,5 @@
+# camel-k: language=yaml
+
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/e2e/common/languages/files/yaml.yaml 
b/e2e/common/languages/files/yaml.yaml
index 8877c8557..767bbe44f 100644
--- a/e2e/common/languages/files/yaml.yaml
+++ b/e2e/common/languages/files/yaml.yaml
@@ -1,3 +1,5 @@
+# camel-k: language=yaml
+
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/e2e/knative/files/flow.yaml b/e2e/knative/files/flow.yaml
index 0742e9522..85c1ab5d9 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/flow.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -20,4 +21,4 @@
     steps:
       - setBody:
           constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+      - to: "log:info"
diff --git a/e2e/knative/files/http_out.groovy 
b/e2e/knative/files/http_out.groovy
deleted file mode 100644
index 40f75a639..000000000
--- a/e2e/knative/files/http_out.groovy
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * 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.
- */
-from("rest:get:hello/")
-      .transform().simple("Hello");
\ No newline at end of file
diff --git a/e2e/knative/files/flow.yaml b/e2e/knative/files/http_out.yaml
similarity index 90%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/http_out.yaml
index 0742e9522..59a6a99f6 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/http_out.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,8 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "rest:get:hello/"
     steps:
       - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+          constant: "Hello"
+      - to: "log:info"
diff --git a/e2e/knative/files/knative1.groovy 
b/e2e/knative/files/knative1.groovy
deleted file mode 100644
index a08952564..000000000
--- a/e2e/knative/files/knative1.groovy
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-
-from('timer:tick')
-  .setBody().constant("")
-  .choice()
-       .when().simple('${random(0, 2)} == 0')
-         .to('knative:endpoint/knative2')
-      .log('Received from 2: ${body}')
-       .otherwise()
-         .to('knative:endpoint/knative3')
-      .log('Received from 3: ${body}')
-       .end()
diff --git a/e2e/knative/files/yaml.yaml b/e2e/knative/files/knative1.yaml
similarity index 68%
copy from e2e/knative/files/yaml.yaml
copy to e2e/knative/files/knative1.yaml
index 8877c8557..7ee49eef9 100644
--- a/e2e/knative/files/yaml.yaml
+++ b/e2e/knative/files/knative1.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,13 +17,21 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "timer:yaml"
-    parameters:
-      period: "5000"
+    uri: "timer:tick"
     steps:
-      - setHeader:
-          name: "m"
-          constant: "string!"
       - setBody:
-          simple: "Magic${header.m}"
-      - to: "log:info"
+          constant: ""
+      - choice:
+          when:
+            - simple: "${random(0, 2)} == 0"
+              steps:
+                - to:
+                    uri: "knative:endpoint/knative2"
+                - log: "Received from 2: ${body}"
+          otherwise:
+            steps:
+              - to:
+                  uri: "knative:endpoint/knative3"
+              - log: "Received from 3: ${body}"
+
+
diff --git a/e2e/knative/files/knative2.groovy 
b/e2e/knative/files/knative2.groovy
deleted file mode 100644
index cb1c6fbda..000000000
--- a/e2e/knative/files/knative2.groovy
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:endpoint/knative2')
-  .setBody().constant("Hello from knative2")
diff --git a/e2e/knative/files/flow.yaml b/e2e/knative/files/knative2.yaml
similarity index 90%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/knative2.yaml
index 0742e9522..a6a0b03ad 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/knative2.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,7 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:endpoint/knative2"
     steps:
       - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+          constant: "Hello from knative2"
diff --git a/e2e/knative/files/knative3.groovy 
b/e2e/knative/files/knative3.groovy
deleted file mode 100644
index 56032983e..000000000
--- a/e2e/knative/files/knative3.groovy
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:endpoint/knative3')
-  .setBody().constant("Hello from knative3")
diff --git a/e2e/knative/files/flow.yaml b/e2e/knative/files/knative3.yaml
similarity index 90%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/knative3.yaml
index 0742e9522..c80b7c47c 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/knative3.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,7 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:endpoint/knative3"
     steps:
       - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+          constant: "Hello from knative3"
diff --git a/e2e/knative/files/knative_broker_receiver.groovy 
b/e2e/knative/files/knative_broker_receiver.groovy
deleted file mode 100644
index f88c5325c..000000000
--- a/e2e/knative/files/knative_broker_receiver.groovy
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:event/hello.1?name=sample-broker')
-  .log('Received 1: ${body}')
-
-from('knative:event/hello.2?name=sample-broker')
-  .log('Received 2: ${body}')
diff --git a/e2e/knative/files/knative_broker_sender.groovy 
b/e2e/knative/files/knative_broker_sender.groovy
deleted file mode 100644
index 04345d8aa..000000000
--- a/e2e/knative/files/knative_broker_sender.groovy
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-
-from('timer:tick')
-  .setBody().constant("Hello 1 from sample-broker")
-  .to('knative:event/hello.1?name=sample-broker')
-
-from('timer:tick')
-  .setBody().constant("Hello 2 from sample-broker")
-  .to('knative:event/hello.2?name=sample-broker')
diff --git a/e2e/knative/files/knativech1.groovy 
b/e2e/knative/files/knativech1.groovy
deleted file mode 100644
index 1a32a6488..000000000
--- a/e2e/knative/files/knativech1.groovy
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-from('timer:tick')
-  .setBody().constant("Hello from knativech1")
-  .to('knative:channel/messages')
diff --git a/e2e/knative/files/flow.yaml b/e2e/knative/files/knativech1.yaml
similarity index 88%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/knativech1.yaml
index 0742e9522..3c63e8240 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/knativech1.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,8 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "timer:tick"
     steps:
       - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+          constant: "Hello from knativech1"
+      - to: "knative:channel/messages"
diff --git a/e2e/knative/files/knativech2.groovy 
b/e2e/knative/files/knativech2.groovy
deleted file mode 100644
index 65eeb2eb9..000000000
--- a/e2e/knative/files/knativech2.groovy
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:channel/messages')
-  .log('Received: ${body}')
diff --git a/e2e/knative/files/flow.yaml b/e2e/knative/files/knativech2.yaml
similarity index 88%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/knativech2.yaml
index 0742e9522..ca9aa38bd 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/knativech2.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,6 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:channel/messages"
     steps:
-      - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+      - log: "Received: ${body}"
diff --git a/e2e/knative/files/knativeevt1.groovy 
b/e2e/knative/files/knativeevt1.groovy
deleted file mode 100644
index afd2d4b07..000000000
--- a/e2e/knative/files/knativeevt1.groovy
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-
-from('timer:tick')
-  .setBody().constant("Hello 1")
-  .to('knative:event/hello.1')
-
-from('timer:tick')
-  .setBody().constant("Hello 2")
-  .to('knative:event/hello.2')
diff --git a/e2e/knative/files/yaml.yaml b/e2e/knative/files/knativeevt1.yaml
similarity index 80%
copy from e2e/knative/files/yaml.yaml
copy to e2e/knative/files/knativeevt1.yaml
index 8877c8557..395e0956d 100644
--- a/e2e/knative/files/yaml.yaml
+++ b/e2e/knative/files/knativeevt1.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,13 +17,15 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "timer:yaml"
-    parameters:
-      period: "5000"
+    uri: "timer:tick"
     steps:
-      - setHeader:
-          name: "m"
-          constant: "string!"
       - setBody:
-          simple: "Magic${header.m}"
-      - to: "log:info"
+          constant: "Hello 1"
+      - to: "knative:event/hello.1"
+
+- from:
+    uri: "timer:tick"
+    steps:
+      - setBody:
+          constant: "Hello 2"
+      - to: "knative:event/hello.2"
diff --git a/e2e/knative/files/knativeevt2.groovy 
b/e2e/knative/files/knativeevt2.groovy
deleted file mode 100644
index 7047751a4..000000000
--- a/e2e/knative/files/knativeevt2.groovy
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:event/hello.1')
-  .log('Received 1: ${body}')
-
-from('knative:event/hello.2')
-  .log('Received 2: ${body}')
diff --git a/e2e/knative/files/flow.yaml b/e2e/knative/files/knativeevt2.yaml
similarity index 84%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/knativeevt2.yaml
index 0742e9522..8e91bb007 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/knativeevt2.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,11 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:event/hello.1"
     steps:
-      - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+      - log: "Received 1: ${body}"
+
+- from:
+    uri: "knative:event/hello.2"
+    steps:
+      - log: "Received 2: ${body}"
diff --git a/e2e/knative/files/knativegetpost1.groovy 
b/e2e/knative/files/knativegetpost1.groovy
deleted file mode 100644
index 37c09e396..000000000
--- a/e2e/knative/files/knativegetpost1.groovy
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.
- */
-
-from('timer:tick')
-  .setBody().constant("")
-  .setHeader("CamelHttpMethod").constant("GET")
-  .to('knative:channel/messages')
diff --git a/e2e/knative/files/yaml.yaml 
b/e2e/knative/files/knativegetpost1.yaml
similarity index 85%
copy from e2e/knative/files/yaml.yaml
copy to e2e/knative/files/knativegetpost1.yaml
index 8877c8557..da0c2dc18 100644
--- a/e2e/knative/files/yaml.yaml
+++ b/e2e/knative/files/knativegetpost1.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,13 +17,11 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "timer:yaml"
-    parameters:
-      period: "5000"
+    uri: "timer:tick"
     steps:
-      - setHeader:
-          name: "m"
-          constant: "string!"
       - setBody:
-          simple: "Magic${header.m}"
-      - to: "log:info"
+          constant: ""
+      - setHeader:
+          name: "CamelHttpMethod"
+          constant: "GET"
+      - to: "knative:channel/messages"
diff --git a/e2e/knative/files/knativegetpost2.groovy 
b/e2e/knative/files/knativegetpost2.groovy
deleted file mode 100644
index d21e2e94e..000000000
--- a/e2e/knative/files/knativegetpost2.groovy
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:channel/messages')
-  .log('Received "${body}"')
diff --git a/e2e/knative/files/flow.yaml 
b/e2e/knative/files/knativegetpost2.yaml
similarity index 88%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/knativegetpost2.yaml
index 0742e9522..2faf7ecd3 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/knativegetpost2.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,6 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:channel/messages"
     steps:
-      - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+      - log: "Received: [${body}]"
diff --git a/e2e/knative/files/knativemultihop1.groovy 
b/e2e/knative/files/knativemultihop1.groovy
deleted file mode 100644
index 64103d7fc..000000000
--- a/e2e/knative/files/knativemultihop1.groovy
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-
-from('timer:tick')
-  .setBody().constant("message")
-  .to('knative:channel/messages')
-
-from('timer:tick')
-  .setBody().constant("word")
-  .to('knative:channel/words')
diff --git a/e2e/knative/files/yaml.yaml 
b/e2e/knative/files/knativemultihop1.yaml
similarity index 80%
copy from e2e/knative/files/yaml.yaml
copy to e2e/knative/files/knativemultihop1.yaml
index 8877c8557..78206859c 100644
--- a/e2e/knative/files/yaml.yaml
+++ b/e2e/knative/files/knativemultihop1.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,13 +17,15 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "timer:yaml"
-    parameters:
-      period: "5000"
+    uri: "timer:tick"
     steps:
-      - setHeader:
-          name: "m"
-          constant: "string!"
       - setBody:
-          simple: "Magic${header.m}"
-      - to: "log:info"
+          constant: "message"
+      - to: "knative:channel/messages"
+
+- from:
+    uri: "timer:tick"
+    steps:
+      - setBody:
+          constant: "word"
+      - to: "knative:channel/words"
diff --git a/e2e/knative/files/knativemultihop2.groovy 
b/e2e/knative/files/knativemultihop2.groovy
deleted file mode 100644
index a5f48a072..000000000
--- a/e2e/knative/files/knativemultihop2.groovy
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:channel/messages')
-  .transform().simple('transformed ${body}')
-  .log('Forwarding: ${body}')
-  .to('knative:channel/words')
diff --git a/e2e/knative/files/flow.yaml 
b/e2e/knative/files/knativemultihop2.yaml
similarity index 85%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/knativemultihop2.yaml
index 0742e9522..c7723dc81 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/knativemultihop2.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,9 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:channel/messages"
     steps:
       - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+          simple: "transformed ${body}"
+      - log: "Forwarding: ${body}"
+      - to: "knative:channel/words"
diff --git a/e2e/knative/files/knativemultihop3.groovy 
b/e2e/knative/files/knativemultihop3.groovy
deleted file mode 100644
index 5567c4551..000000000
--- a/e2e/knative/files/knativemultihop3.groovy
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:channel/messages')
-  .log('From messages: ${body}')
-  .to('log:messages?showHeaders=true')
-
-from('knative:channel/words')
-  .log('From words: ${body}')
-  .to('log:words?showHeaders=true')
diff --git a/e2e/knative/files/yaml.yaml 
b/e2e/knative/files/knativemultihop3.yaml
similarity index 77%
copy from e2e/knative/files/yaml.yaml
copy to e2e/knative/files/knativemultihop3.yaml
index 8877c8557..1e169880b 100644
--- a/e2e/knative/files/yaml.yaml
+++ b/e2e/knative/files/knativemultihop3.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,13 +17,13 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "timer:yaml"
-    parameters:
-      period: "5000"
+    uri: "knative:channel/messages"
     steps:
-      - setHeader:
-          name: "m"
-          constant: "string!"
-      - setBody:
-          simple: "Magic${header.m}"
-      - to: "log:info"
+      - log: "From messages: ${body}"
+      - to: "log:messages?showHeaders=true"
+
+- from:
+    uri: "knative:channel/words"
+    steps:
+      - log: "From words: ${body}"
+      - to: "log:words?showHeaders=true"
diff --git a/e2e/knative/files/petstore.groovy 
b/e2e/knative/files/petstore.groovy
deleted file mode 100644
index d382b217c..000000000
--- a/e2e/knative/files/petstore.groovy
+++ /dev/null
@@ -1,29 +0,0 @@
-// camel-k: language=groovy
-/*
- * 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.
- */
-
-//
-//  kamel run --dev --name petstore --open-api examples/petstore-api.yaml 
examples/petstore.groovy
-// 
-
-from('direct:listPets')
-    .log('listPets')
-from('direct:createPets')
-    .log('createPets')
-from('direct:showPetById')
-    .log('showPetById')
-
diff --git a/e2e/knative/files/yaml.yaml b/e2e/knative/files/petstore.yaml
similarity index 75%
copy from e2e/knative/files/yaml.yaml
copy to e2e/knative/files/petstore.yaml
index 8877c8557..72087814f 100644
--- a/e2e/knative/files/yaml.yaml
+++ b/e2e/knative/files/petstore.yaml
@@ -1,3 +1,5 @@
+# camel-k: language=yaml
+
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,13 +18,22 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "timer:yaml"
-    parameters:
-      period: "5000"
+    uri: "direct:listPets"
+    steps:
+      - setBody:
+          simple: "listPets"
+      - to: "log:info"
+
+- from:
+    uri: "direct:createPets"
+    steps:
+      - setBody:
+          simple: "createPets"
+      - to: "log:info"
+
+- from:
+    uri: "direct:showPetById"
     steps:
-      - setHeader:
-          name: "m"
-          constant: "string!"
       - setBody:
-          simple: "Magic${header.m}"
+          simple: "showPetById"
       - to: "log:info"
diff --git a/e2e/knative/files/podtest-knative1.groovy 
b/e2e/knative/files/podtest-knative1.groovy
deleted file mode 100644
index 8e7bd75e0..000000000
--- a/e2e/knative/files/podtest-knative1.groovy
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.
- */
-
-from('timer:tick')
- .setBody().constant("")
-.to('knative:endpoint/podtest-knative2')
-.log('Received: ${body}')
diff --git a/e2e/knative/files/flow.yaml 
b/e2e/knative/files/podtest-knative1.yaml
similarity index 86%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/podtest-knative1.yaml
index 0742e9522..348cf24fe 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/podtest-knative1.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,9 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "timer:tick"
     steps:
       - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+          constant: ""
+      - to: "knative:endpoint/podtest-knative2"
+      - log: "Received: ${body}"
diff --git a/e2e/knative/files/podtest-knative2.groovy 
b/e2e/knative/files/podtest-knative2.groovy
deleted file mode 100644
index 62a8411dc..000000000
--- a/e2e/knative/files/podtest-knative2.groovy
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:endpoint/podtest-knative2')
-  .setBody().constant("{{TEST_ENV_VARIABLE}}")
diff --git a/e2e/knative/files/flow.yaml 
b/e2e/knative/files/podtest-knative2.yaml
similarity index 89%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/podtest-knative2.yaml
index 0742e9522..7950f0361 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/podtest-knative2.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,7 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:endpoint/podtest-knative2"
     steps:
       - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+          constant: "{{TEST_ENV_VARIABLE}}"
diff --git a/e2e/knative/files/test-kamelet-display.groovy 
b/e2e/knative/files/test-kamelet-display.groovy
deleted file mode 100644
index fcde17d22..000000000
--- a/e2e/knative/files/test-kamelet-display.groovy
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-from('knative:channel/test-kamelet-messages')
-    .convertBodyTo(String.class)
-    .to('log:info?showAll=false')
diff --git a/e2e/knative/files/flow.yaml 
b/e2e/knative/files/test-kamelet-display.yaml
similarity index 88%
copy from e2e/knative/files/flow.yaml
copy to e2e/knative/files/test-kamelet-display.yaml
index 0742e9522..9dc85e2c4 100644
--- a/e2e/knative/files/flow.yaml
+++ b/e2e/knative/files/test-kamelet-display.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,8 +17,6 @@
 # ---------------------------------------------------------------------------
 
 - from:
-    uri: "knative:endpoint/example"
+    uri: "knative:channel/test-kamelet-messages"
     steps:
-      - setBody:
-          constant: "Hello Camel K from yaml"
-      - to: "log:info"
\ No newline at end of file
+      - to: "log:info?showAll=false"
diff --git a/e2e/knative/files/yaml.yaml b/e2e/knative/files/yaml.yaml
index 8877c8557..e69c8db7a 100644
--- a/e2e/knative/files/yaml.yaml
+++ b/e2e/knative/files/yaml.yaml
@@ -1,3 +1,4 @@
+# camel-k: language=yaml
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/e2e/knative/kamelet_test.go b/e2e/knative/kamelet_test.go
index 1ae16ffe2..080401d74 100644
--- a/e2e/knative/kamelet_test.go
+++ b/e2e/knative/kamelet_test.go
@@ -48,7 +48,7 @@ func TestKameletChange(t *testing.T) {
                g.Expect(CreateTimerKamelet(t, ctx, operatorID, ns, 
timerSource)()).To(Succeed())
                g.Expect(CreateKnativeChannel(t, ctx, ns, 
knChannel)()).To(Succeed())
                // Consumer route that will read from the Knative channel
-               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/test-kamelet-display.groovy", "-w").Execute()).To(Succeed())
+               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/test-kamelet-display.yaml", "-w").Execute()).To(Succeed())
                g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"test-kamelet-display")).Should(Equal(corev1.PodRunning))
 
                // Create the Pipe
diff --git a/e2e/knative/knative_test.go b/e2e/knative/knative_pipes_test.go
similarity index 91%
rename from e2e/knative/knative_test.go
rename to e2e/knative/knative_pipes_test.go
index bd7ef3b80..eb5a63fd2 100644
--- a/e2e/knative/knative_test.go
+++ b/e2e/knative/knative_pipes_test.go
@@ -25,18 +25,16 @@ package knative
 import (
        "context"
        "fmt"
-       "testing"
-       "time"
-
        . "github.com/onsi/gomega"
-
        v1 "k8s.io/api/core/v1"
+       "testing"
+       "time"
 
        . "github.com/apache/camel-k/v2/e2e/support"
        camelv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 )
 
-func TestKnative(t *testing.T) {
+func TestKnativePipes(t *testing.T) {
        WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) {
                knChannelMessages := "messages"
                knChannelWords := "words"
@@ -44,13 +42,13 @@ func TestKnative(t *testing.T) {
                g.Expect(CreateKnativeChannel(t, ctx, ns, 
knChannelWords)()).To(Succeed())
 
                t.Run("Service combo", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative2.groovy").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative2.yaml").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knative2"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
"knative2", camelv1.IntegrationConditionReady), 
TestTimeoutMedium).Should(Equal(v1.ConditionTrue))
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative3.groovy").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative3.yaml").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knative3"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
"knative3", camelv1.IntegrationConditionReady), 
TestTimeoutMedium).Should(Equal(v1.ConditionTrue))
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative1.groovy").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative1.yaml").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knative1"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
"knative1", camelv1.IntegrationConditionReady), 
TestTimeoutMedium).Should(Equal(v1.ConditionTrue))
                        // Correct logs
@@ -64,8 +62,8 @@ func TestKnative(t *testing.T) {
                })
 
                t.Run("Channel combo v1beta1", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativech2.groovy").Execute()).To(Succeed())
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativech1.groovy").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativech2.yaml").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativech1.yaml").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knativech2"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knativech1"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationLogs(t, ctx, ns, "knativech2"), 
TestTimeoutMedium).Should(ContainSubstring("Received: Hello from knativech1"))
@@ -73,18 +71,18 @@ func TestKnative(t *testing.T) {
                })
 
                t.Run("Channel combo get to post", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativegetpost2.groovy").Execute()).To(Succeed())
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativegetpost1.groovy").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativegetpost2.yaml").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativegetpost1.yaml").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knativegetpost2"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knativegetpost1"), TestTimeoutLong).Should(Equal(v1.PodRunning))
-                       g.Eventually(IntegrationLogs(t, ctx, ns, 
"knativegetpost2"), TestTimeoutMedium).Should(ContainSubstring(`Received ""`))
+                       g.Eventually(IntegrationLogs(t, ctx, ns, 
"knativegetpost2"), TestTimeoutMedium).Should(ContainSubstring("Received: []"))
                        g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
                })
 
                t.Run("Multi channel chain", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativemultihop3.groovy").Execute()).To(Succeed())
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativemultihop2.groovy").Execute()).To(Succeed())
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativemultihop1.groovy").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativemultihop3.yaml").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativemultihop2.yaml").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativemultihop1.yaml").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knativemultihop3"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knativemultihop2"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knativemultihop1"), TestTimeoutLong).Should(Equal(v1.PodRunning))
@@ -110,7 +108,7 @@ func TestKnative(t *testing.T) {
                })
 
                t.Run("Knative-service disabled", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/http_out.groovy", "-t", 
"knative-service.enabled=false").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/http_out.yaml", "-t", 
"knative-service.enabled=false").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"http-out"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(Service(t, ctx, ns, "http-out"), 
TestTimeoutShort).ShouldNot(BeNil())
                        g.Consistently(KnativeService(t, ctx, ns, "http-out"), 
TestTimeoutShort).Should(BeNil())
@@ -118,14 +116,14 @@ func TestKnative(t *testing.T) {
                })
 
                t.Run("Knative-service priority", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/http_out.groovy").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/http_out.yaml").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"http-out"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(KnativeService(t, ctx, ns, "http-out"), 
TestTimeoutShort).ShouldNot(BeNil())
                        g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
                })
 
                t.Run("Knative-service annotation", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative2.groovy", "-t", 
"knative-service.annotations.'haproxy.router.openshift.io/balance'=roundrobin").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knative2.yaml", "-t", 
"knative-service.annotations.'haproxy.router.openshift.io/balance'=roundrobin").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"knative2"), TestTimeoutLong).Should(Equal(v1.PodRunning))
                        g.Eventually(KnativeService(t, ctx, ns, "knative2"), 
TestTimeoutShort).ShouldNot(BeNil())
                        ks := KnativeService(t, ctx, ns, "knative2")()
@@ -143,8 +141,8 @@ func TestRunBroker(t *testing.T) {
 
                g.Eventually(SelectedPlatformPhase(t, ctx, ns, operatorID), 
TestTimeoutMedium).Should(Equal(camelv1.IntegrationPlatformPhaseReady))
 
-               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativeevt1.groovy").Execute()).To(Succeed())
-               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativeevt2.groovy").Execute()).To(Succeed())
+               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativeevt1.yaml").Execute()).To(Succeed())
+               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/knativeevt2.yaml").Execute()).To(Succeed())
                g.Eventually(IntegrationPodPhase(t, ctx, ns, "knativeevt1"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
                g.Eventually(IntegrationPodPhase(t, ctx, ns, "knativeevt2"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
                g.Eventually(IntegrationLogs(t, ctx, ns, "knativeevt2"), 
TestTimeoutMedium).Should(ContainSubstring("Received 1: Hello 1"))
diff --git a/e2e/knative/openapi_test.go b/e2e/knative/openapi_test.go
index ea726b75e..0677c5e53 100644
--- a/e2e/knative/openapi_test.go
+++ b/e2e/knative/openapi_test.go
@@ -45,7 +45,7 @@ func TestOpenAPIService(t *testing.T) {
                cmDataProps["petstore-api.yaml"] = string(openapiContent)
                CreatePlainTextConfigmap(t, ctx, ns, "my-openapi-knative", 
cmDataProps)
 
-               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "--name", 
"petstore", "--open-api", "configmap:my-openapi-knative", 
"files/petstore.groovy").Execute()).To(Succeed())
+               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "--name", 
"petstore", "--open-api", "configmap:my-openapi-knative", 
"files/petstore.yaml").Execute()).To(Succeed())
 
                g.Eventually(KnativeService(t, ctx, ns, "petstore"), 
TestTimeoutLong).
                        Should(Not(BeNil()))
diff --git a/e2e/knative/pod_test.go b/e2e/knative/pod_test.go
index 21d52dfb4..7ebdaa04a 100644
--- a/e2e/knative/pod_test.go
+++ b/e2e/knative/pod_test.go
@@ -36,10 +36,10 @@ import (
 
 func TestPodTraitWithKnative(t *testing.T) {
        WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) {
-               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/podtest-knative2.groovy", "--pod-template", 
"files/template-knative.yaml").Execute()).To(Succeed())
+               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/podtest-knative2.yaml", "--pod-template", 
"files/template-knative.yaml").Execute()).To(Succeed())
                g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"podtest-knative2"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
                g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
"podtest-knative2", v1.IntegrationConditionReady), 
TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
-               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/podtest-knative1.groovy").Execute()).To(Succeed())
+               g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/podtest-knative1.yaml").Execute()).To(Succeed())
                g.Eventually(IntegrationPodPhase(t, ctx, ns, 
"podtest-knative1"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
                g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
"podtest-knative1", v1.IntegrationConditionReady), 
TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
                g.Eventually(IntegrationLogs(t, ctx, ns, "podtest-knative1"), 
TestTimeoutShort).Should(ContainSubstring("hello from the template"))

Reply via email to