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

squakez pushed a commit to branch release-2.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/release-2.10.x by this push:
     new bcfb935cb chore(e2e): integration apply test
bcfb935cb is described below

commit bcfb935cb182baa993cb3c6348f2e4f19cd2c78a
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Sat May 9 10:02:40 2026 +0200

    chore(e2e): integration apply test
---
 e2e/common/cli/files/my-it.yaml | 32 +++++++++++++++++++++
 e2e/common/cli/it_apply_test.go | 61 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 93 insertions(+)

diff --git a/e2e/common/cli/files/my-it.yaml b/e2e/common/cli/files/my-it.yaml
new file mode 100644
index 000000000..c320190ce
--- /dev/null
+++ b/e2e/common/cli/files/my-it.yaml
@@ -0,0 +1,32 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1
+kind: Integration
+metadata:
+  name: my-it
+spec:
+  flows:
+  - route:
+      from:
+        parameters:
+          period: "1000"
+        steps:
+        - setBody:
+            simple: Hello Camel from my-it
+        - log: ${body}
+        uri: timer:yaml
diff --git a/e2e/common/cli/it_apply_test.go b/e2e/common/cli/it_apply_test.go
new file mode 100644
index 000000000..18a3c2e09
--- /dev/null
+++ b/e2e/common/cli/it_apply_test.go
@@ -0,0 +1,61 @@
+//go:build integration
+// +build integration
+
+// To enable compilation of this file in Goland, go to "Settings -> Go -> 
Vendoring & Build Tags -> Custom Tags" and add "integration"
+
+/*
+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.
+*/
+
+package common
+
+import (
+       "context"
+       "os/exec"
+       "testing"
+
+       corev1 "k8s.io/api/core/v1"
+
+       . "github.com/apache/camel-k/v2/e2e/support"
+       v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+       . "github.com/onsi/gomega"
+)
+
+func TestKubectlApply(t *testing.T) {
+       t.Parallel()
+       WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) {
+               t.Run("kubectl apply", func(t *testing.T) {
+                       name := "my-it"
+
+                       ExpectExecSucceed(t, g,
+                               exec.Command(
+                                       "kubectl",
+                                       "apply",
+                                       "-f",
+                                       "files/my-it.yaml",
+                                       "-n",
+                                       ns,
+                               ),
+                       )
+
+                       g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
name, v1.IntegrationConditionReady), TestTimeoutMedium).
+                               Should(Equal(corev1.ConditionTrue))
+                       g.Eventually(IntegrationPodPhase(t, ctx, ns, 
name)).Should(Equal(corev1.PodRunning))
+
+                       g.Eventually(IntegrationLogs(t, ctx, ns, 
name)).Should(ContainSubstring("Hello Camel from my-it"))
+               })
+       })
+}

Reply via email to