You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/07/16 15:53:11 UTC

[camel-k] branch master updated: test(yaml): Add YAML e2e test

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 130f230  test(yaml): Add YAML e2e test
130f230 is described below

commit 130f23034592823748930ea274261ae80fcedac9
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Jul 16 09:46:33 2019 +0100

    test(yaml): Add YAML e2e test
    
    fixes #780
---
 e2e/files/yaml.yaml | 12 ++++++++++++
 e2e/run_test.go     |  7 +++++++
 2 files changed, 19 insertions(+)

diff --git a/e2e/files/yaml.yaml b/e2e/files/yaml.yaml
new file mode 100644
index 0000000..f79e2b4
--- /dev/null
+++ b/e2e/files/yaml.yaml
@@ -0,0 +1,12 @@
+- id: "yaml"
+  from:
+    uri: "timer:yaml"
+    parameters:
+      period: "5s"
+    steps:
+      - set-header:
+          name: "m"
+          constant: "string!"
+      - set-body:
+          simple: "Magic${header.m}"
+      - to: "log:info"
diff --git a/e2e/run_test.go b/e2e/run_test.go
index 550a685..90d2a35 100644
--- a/e2e/run_test.go
+++ b/e2e/run_test.go
@@ -74,5 +74,12 @@ func TestRunSimpleExamples(t *testing.T) {
 			Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
 		})
 
+		t.Run("run yaml", func(t *testing.T) {
+			RegisterTestingT(t)
+			Expect(kamel("run", "-n", ns, "files/yaml.yaml").Execute()).Should(BeNil())
+			Eventually(integrationPodPhase(ns, "yaml"), 5*time.Minute).Should(Equal(v1.PodRunning))
+			Eventually(integrationLogs(ns, "yaml"), 1*time.Minute).Should(ContainSubstring("Magicstring!"))
+			Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
+		})
 	})
 }