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

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

commit 14f0c098d34a1a4ebb1cbcfd9eb8697c4d2e5a22
Author: Thomas Diesler <[email protected]>
AuthorDate: Fri May 17 09:20:55 2024 +0200

    (#5489) Use yaml in e2e install
---
 e2e/README.md                                         |  4 ++--
 e2e/builder/files/example.yaml                        |  4 ++++
 .../config/files/build-property-file-route.yaml       |  2 ++
 e2e/common/config/files/build-property-route.yaml     |  2 ++
 .../files/config-configmap-properties-route.yaml      |  2 ++
 e2e/common/config/files/config-configmap-route.yaml   |  2 ++
 e2e/common/config/files/config-secret-key-route.yaml  |  2 ++
 e2e/common/config/files/config-secret-route.yaml      |  2 ++
 e2e/common/config/files/property-file-route.yaml      |  2 ++
 e2e/common/config/files/property-route.yaml           |  2 ++
 e2e/common/config/files/property-secret-route.yaml    |  2 ++
 .../files/resource-configmap-key-location-route.yaml  |  2 ++
 .../files/resource-configmap-location-route.yaml      |  2 ++
 e2e/common/config/files/resource-configmap-route.yaml |  2 ++
 e2e/common/config/files/resource-secret-route.yaml    |  2 ++
 e2e/common/traits/files/openapi/petstore.yaml         |  2 ++
 e2e/common/traits/openapi_test.go                     | 10 ++++++++--
 e2e/install/cli/files/timer-kamelet-usage.groovy      | 19 -------------------
 .../cli/files/timer-kamelet-usage.yaml}               |  9 +++------
 e2e/install/cli/global_kamelet_test.go                |  4 ++--
 20 files changed, 47 insertions(+), 31 deletions(-)

diff --git a/e2e/README.md b/e2e/README.md
index 4119885a9..0f44a1cc4 100644
--- a/e2e/README.md
+++ b/e2e/README.md
@@ -33,7 +33,7 @@ Test suite that cover the different installation procedures 
we offer and any upg
 
 ### Knative
 
-Test suite that cover the features associated with Knative. This test will 
assume the presence of a namespaced operator (installation provided by the same 
test execution suite) togheter with Knative operator configuration.
+Test suite that cover the features associated with Knative. This test will 
assume the presence of a namespaced operator (installation provided by the same 
test execution suite) together with Knative operator configuration.
 
 ### Native
 
@@ -45,7 +45,7 @@ Test suite that cover the features associated with Telemetry 
feature. The test e
 
 ### Yaks
 
-Test suite that cover certain Knative features togheter with YAKS operator.
+Test suite that cover certain Knative features together with YAKS operator.
 
 ## Environment variables
 
diff --git a/e2e/builder/files/example.yaml b/e2e/builder/files/example.yaml
index 861535412..dfc43f678 100644
--- a/e2e/builder/files/example.yaml
+++ b/e2e/builder/files/example.yaml
@@ -1,3 +1,6 @@
+# camel-k: language=yaml
+
+# ---------------------------------------------------------------------------
 # 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.
@@ -12,6 +15,7 @@
 # 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:
     uri: "timer:tick"
diff --git a/e2e/common/config/files/build-property-file-route.yaml 
b/e2e/common/config/files/build-property-file-route.yaml
index 76e38ced7..0f6d64c5c 100644
--- a/e2e/common/config/files/build-property-file-route.yaml
+++ b/e2e/common/config/files/build-property-file-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:build-property"
diff --git a/e2e/common/config/files/build-property-route.yaml 
b/e2e/common/config/files/build-property-route.yaml
index 76e38ced7..0f6d64c5c 100644
--- a/e2e/common/config/files/build-property-route.yaml
+++ b/e2e/common/config/files/build-property-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:build-property"
diff --git a/e2e/common/config/files/config-configmap-properties-route.yaml 
b/e2e/common/config/files/config-configmap-properties-route.yaml
index 89e359746..4c710304d 100644
--- a/e2e/common/config/files/config-configmap-properties-route.yaml
+++ b/e2e/common/config/files/config-configmap-properties-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:configmap"
diff --git a/e2e/common/config/files/config-configmap-route.yaml 
b/e2e/common/config/files/config-configmap-route.yaml
index 4b526d41e..5f612f768 100644
--- a/e2e/common/config/files/config-configmap-route.yaml
+++ b/e2e/common/config/files/config-configmap-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:configmap"
diff --git a/e2e/common/config/files/config-secret-key-route.yaml 
b/e2e/common/config/files/config-secret-key-route.yaml
index ab76506a3..a41f2f7b4 100644
--- a/e2e/common/config/files/config-secret-key-route.yaml
+++ b/e2e/common/config/files/config-secret-key-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:secret"
diff --git a/e2e/common/config/files/config-secret-route.yaml 
b/e2e/common/config/files/config-secret-route.yaml
index 03bd7440e..9de829a01 100644
--- a/e2e/common/config/files/config-secret-route.yaml
+++ b/e2e/common/config/files/config-secret-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:secret"
diff --git a/e2e/common/config/files/property-file-route.yaml 
b/e2e/common/config/files/property-file-route.yaml
index ea33d2a95..a9e159aa7 100644
--- a/e2e/common/config/files/property-file-route.yaml
+++ b/e2e/common/config/files/property-file-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:property-file"
diff --git a/e2e/common/config/files/property-route.yaml 
b/e2e/common/config/files/property-route.yaml
index 4d7a924b7..858d89f8c 100644
--- a/e2e/common/config/files/property-route.yaml
+++ b/e2e/common/config/files/property-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:property"
diff --git a/e2e/common/config/files/property-secret-route.yaml 
b/e2e/common/config/files/property-secret-route.yaml
index b826aed97..8ca215904 100644
--- a/e2e/common/config/files/property-secret-route.yaml
+++ b/e2e/common/config/files/property-secret-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "timer:property"
diff --git a/e2e/common/config/files/resource-configmap-key-location-route.yaml 
b/e2e/common/config/files/resource-configmap-key-location-route.yaml
index 428ec1c3b..b7fb09c17 100644
--- a/e2e/common/config/files/resource-configmap-key-location-route.yaml
+++ b/e2e/common/config/files/resource-configmap-key-location-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "file:/tmp/app/?fileName=test.txt&noop=true&idempotent=false"
diff --git a/e2e/common/config/files/resource-configmap-location-route.yaml 
b/e2e/common/config/files/resource-configmap-location-route.yaml
index fe4638b11..093e42d2c 100644
--- a/e2e/common/config/files/resource-configmap-location-route.yaml
+++ b/e2e/common/config/files/resource-configmap-location-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "file:/tmp/app/?fileName=my-configmap-key&noop=true&idempotent=false"
diff --git a/e2e/common/config/files/resource-configmap-route.yaml 
b/e2e/common/config/files/resource-configmap-route.yaml
index d5e823f63..3c90b8923 100644
--- a/e2e/common/config/files/resource-configmap-route.yaml
+++ b/e2e/common/config/files/resource-configmap-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: 
"file:/etc/camel/resources/my-cm/?fileName=my-configmap-key&noop=true&idempotent=false"
diff --git a/e2e/common/config/files/resource-secret-route.yaml 
b/e2e/common/config/files/resource-secret-route.yaml
index 9407c7921..024a4d7ec 100644
--- a/e2e/common/config/files/resource-secret-route.yaml
+++ b/e2e/common/config/files/resource-secret-route.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: 
"file:/etc/camel/resources/my-sec/?fileName=my-secret-key&noop=true&idempotent=false"
diff --git a/e2e/common/traits/files/openapi/petstore.yaml 
b/e2e/common/traits/files/openapi/petstore.yaml
index 1031c5ed3..72087814f 100644
--- a/e2e/common/traits/files/openapi/petstore.yaml
+++ b/e2e/common/traits/files/openapi/petstore.yaml
@@ -1,5 +1,6 @@
 # camel-k: language=yaml
 
+# ---------------------------------------------------------------------------
 # 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.
@@ -14,6 +15,7 @@
 # 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:
     uri: "direct:listPets"
diff --git a/e2e/common/traits/openapi_test.go 
b/e2e/common/traits/openapi_test.go
index ea3bd7d32..45ea2a75e 100644
--- a/e2e/common/traits/openapi_test.go
+++ b/e2e/common/traits/openapi_test.go
@@ -24,7 +24,7 @@ package traits
 
 import (
        "context"
-       "io/ioutil"
+       "os"
        "testing"
 
        . "github.com/onsi/gomega"
@@ -39,6 +39,12 @@ import (
 func TestOpenAPI(t *testing.T) {
        t.Parallel()
 
+       /*
+               kubectl create configmap my-openapi 
--from-file=./e2e/common/traits/files/openapi/petstore-api.yaml
+
+               kamel run --dev --name=petstore --open-api configmap:my-openapi 
./e2e/common/traits/files/openapi/petstore.yaml
+       */
+
        WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) {
                operatorID := "camel-k-traits-openapi"
                g.Expect(CopyCamelCatalog(t, ctx, ns, operatorID)).To(Succeed())
@@ -47,7 +53,7 @@ func TestOpenAPI(t *testing.T) {
 
                g.Eventually(SelectedPlatformPhase(t, ctx, ns, operatorID), 
TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
 
-               openapiContent, err := 
ioutil.ReadFile("./files/openapi/petstore-api.yaml")
+               openapiContent, err := 
os.ReadFile("./files/openapi/petstore-api.yaml")
                require.NoError(t, err)
                var cmDataProps = make(map[string]string)
                cmDataProps["petstore-api.yaml"] = string(openapiContent)
diff --git a/e2e/install/cli/files/timer-kamelet-usage.groovy 
b/e2e/install/cli/files/timer-kamelet-usage.groovy
deleted file mode 100644
index 11ad5bb27..000000000
--- a/e2e/install/cli/files/timer-kamelet-usage.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('kamelet:my-own-timer-source?message=Hello+world')
-    .to('log:info?showAll=false')
diff --git a/e2e/builder/files/example.yaml 
b/e2e/install/cli/files/timer-kamelet-usage.yaml
similarity index 79%
copy from e2e/builder/files/example.yaml
copy to e2e/install/cli/files/timer-kamelet-usage.yaml
index 861535412..206ba027b 100644
--- a/e2e/builder/files/example.yaml
+++ b/e2e/install/cli/files/timer-kamelet-usage.yaml
@@ -1,3 +1,4 @@
+# ---------------------------------------------------------------------------
 # 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.
@@ -12,13 +13,9 @@
 # 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:
-    uri: "timer:tick"
+    uri: "kamelet:my-own-timer-source?message=Hello+world"
     steps:
-      - setHeader:
-          name: "m"
-          simple: "string!"
-      - setBody:
-          simple: "Magic${header.m}"
       - to: "log:info?showAll=false"
diff --git a/e2e/install/cli/global_kamelet_test.go 
b/e2e/install/cli/global_kamelet_test.go
index 40a17645a..cfaa62d1f 100644
--- a/e2e/install/cli/global_kamelet_test.go
+++ b/e2e/install/cli/global_kamelet_test.go
@@ -45,7 +45,7 @@ func TestRunGlobalKamelet(t *testing.T) {
 
                                g.Expect(KamelInstallWithID(t, ctx, operatorID, 
ns2, "--skip-operator-setup", "--olm=false")).To(Succeed())
 
-                               g.Expect(KamelRunWithID(t, ctx, operatorID, 
ns2, "files/timer-kamelet-usage.groovy").Execute()).To(Succeed())
+                               g.Expect(KamelRunWithID(t, ctx, operatorID, 
ns2, "files/timer-kamelet-usage.yaml").Execute()).To(Succeed())
                                g.Eventually(IntegrationPodPhase(t, ctx, ns2, 
"timer-kamelet-usage"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
                                g.Eventually(IntegrationLogs(t, ctx, ns2, 
"timer-kamelet-usage"), TestTimeoutShort).Should(ContainSubstring("Hello 
world"))
                                g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns2).Execute()).To(Succeed())
@@ -60,7 +60,7 @@ func TestRunGlobalKamelet(t *testing.T) {
                        WithNewTestNamespace(t, func(ctx context.Context, g 
*WithT, ns3 string) {
                                g.Expect(KamelInstallWithID(t, ctx, operatorID, 
ns3, "--skip-operator-setup", "--olm=false")).To(Succeed())
 
-                               g.Expect(KamelRunWithID(t, ctx, operatorID, 
ns3, "files/timer-kamelet-usage.groovy").Execute()).To(Succeed())
+                               g.Expect(KamelRunWithID(t, ctx, operatorID, 
ns3, "files/timer-kamelet-usage.yaml").Execute()).To(Succeed())
                                g.Eventually(IntegrationPodPhase(t, ctx, ns3, 
"timer-kamelet-usage"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
                                g.Eventually(IntegrationLogs(t, ctx, ns3, 
"timer-kamelet-usage"), TestTimeoutShort).Should(ContainSubstring("Hello 
world"))
                                g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns3).Execute()).To(Succeed())

Reply via email to