diff --git a/e2e/builder/files/example.yaml b/e2e/builder/files/example.yaml new file mode 100644 index 0000000000..861535412e --- /dev/null +++ b/e2e/builder/files/example.yaml @@ -0,0 +1,24 @@ +# 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: + uri: "timer:tick" + steps: + - setHeader: + name: "m" + simple: "string!" + - setBody: + simple: "Magic${header.m}" + - to: "log:info?showAll=false" diff --git a/e2e/builder/files/groovy.groovy b/e2e/builder/files/groovy.groovy deleted file mode 100644 index f87d81567d..0000000000 --- a/e2e/builder/files/groovy.groovy +++ /dev/null @@ -1,23 +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:groovy?period=1000') - .routeId('groovy') - .setHeader("m").constant("string!") - .setBody() - .simple('Magic${header.m}') - .to('log:info?showAll=false') diff --git a/e2e/builder/registry_test.go b/e2e/builder/registry_test.go index 4eb413cb5b..c8fcbb05c4 100644 --- a/e2e/builder/registry_test.go +++ b/e2e/builder/registry_test.go @@ -46,10 +46,10 @@ func TestRunWithDockerHubRegistry(t *testing.T) { operatorID := "camel-k-docker-hub" g.Expect(KamelInstallWithID(t, ctx, operatorID, ns, "--registry", "docker.io", "--organization", user, "--registry-auth-username", user, "--registry-auth-password", pass, "--cluster-type", "kubernetes")).To(Succeed()) - g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "files/groovy.groovy").Execute()).To(Succeed()) - g.Eventually(IntegrationPodPhase(t, ctx, ns, "groovy"), TestTimeoutLong).Should(Equal(v1.PodRunning)) - g.Eventually(IntegrationLogs(t, ctx, ns, "groovy"), TestTimeoutShort).Should(ContainSubstring("Magicstring!")) - g.Eventually(IntegrationPodImage(t, ctx, ns, "groovy"), TestTimeoutShort).Should(HavePrefix("docker.io")) + g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "files/example.yaml").Execute()).To(Succeed()) + g.Eventually(IntegrationPodPhase(t, ctx, ns, "example"), TestTimeoutLong).Should(Equal(v1.PodRunning)) + g.Eventually(IntegrationLogs(t, ctx, ns, "example"), TestTimeoutShort).Should(ContainSubstring("Magicstring!")) + g.Eventually(IntegrationPodImage(t, ctx, ns, "example"), TestTimeoutShort).Should(HavePrefix("docker.io")) g.Expect(Kamel(t, ctx, "delete", "--all", "-n", ns).Execute()).To(Succeed()) }) @@ -68,10 +68,10 @@ func TestRunWithGithubPackagesRegistry(t *testing.T) { operatorID := "camel-k-github-registry" g.Expect(KamelInstallWithID(t, ctx, operatorID, ns, "--registry", "docker.pkg.github.com", "--organization", repo, "--registry-auth-username", user, "--registry-auth-password", pass, "--cluster-type", "kubernetes")).To(Succeed()) - g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "files/groovy.groovy").Execute()).To(Succeed()) - g.Eventually(IntegrationPodPhase(t, ctx, ns, "groovy"), TestTimeoutLong).Should(Equal(v1.PodRunning)) - g.Eventually(IntegrationLogs(t, ctx, ns, "groovy"), TestTimeoutShort).Should(ContainSubstring("Magicstring!")) - g.Eventually(IntegrationPodImage(t, ctx, ns, "groovy"), TestTimeoutShort).Should(HavePrefix("docker.pkg.github.com")) + g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "files/example.yaml").Execute()).To(Succeed()) + g.Eventually(IntegrationPodPhase(t, ctx, ns, "example"), TestTimeoutLong).Should(Equal(v1.PodRunning)) + g.Eventually(IntegrationLogs(t, ctx, ns, "example"), TestTimeoutShort).Should(ContainSubstring("Magicstring!")) + g.Eventually(IntegrationPodImage(t, ctx, ns, "example"), TestTimeoutShort).Should(HavePrefix("docker.pkg.github.com")) g.Expect(Kamel(t, ctx, "delete", "--all", "-n", ns).Execute()).To(Succeed()) })