Skip to content

Commit

Permalink
(apache#5489) Use yaml in e2e builder
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiesler committed May 15, 2024
1 parent d58b512 commit f91aa47
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 31 deletions.
24 changes: 24 additions & 0 deletions e2e/builder/files/example.yaml
Original file line number Diff line number Diff line change
@@ -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"
23 changes: 0 additions & 23 deletions e2e/builder/files/groovy.groovy

This file was deleted.

16 changes: 8 additions & 8 deletions e2e/builder/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
})
Expand All @@ -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())
})
Expand Down

0 comments on commit f91aa47

Please sign in to comment.