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

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

commit 1d523e5f50dc673a845d918eb453559ec60e7059
Author: Tadayoshi Sato <sato.tadayo...@gmail.com>
AuthorDate: Fri Jul 15 16:20:18 2022 +0900

    chore(e2e): reorg and clean up e2e/global/builder
---
 e2e/global/builder/docker_hub_test.go      | 60 --------------------
 e2e/global/builder/files/Java.java         | 28 ----------
 e2e/global/builder/github_packages_test.go | 61 --------------------
 e2e/global/builder/registry_test.go        | 89 ++++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 149 deletions(-)

diff --git a/e2e/global/builder/docker_hub_test.go 
b/e2e/global/builder/docker_hub_test.go
deleted file mode 100644
index b838c988f..000000000
--- a/e2e/global/builder/docker_hub_test.go
+++ /dev/null
@@ -1,60 +0,0 @@
-//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 builder
-
-import (
-       "os"
-       "testing"
-
-       . "github.com/onsi/gomega"
-
-       v1 "k8s.io/api/core/v1"
-
-       . "github.com/apache/camel-k/e2e/support"
-)
-
-func TestRunWithDockerHubRegistry(t *testing.T) {
-       user := os.Getenv("TEST_DOCKER_HUB_USERNAME")
-       pass := os.Getenv("TEST_DOCKER_HUB_PASSWORD")
-       if user == "" || pass == "" {
-               t.Skip("no docker hub credentials: skipping")
-       } else {
-               WithNewTestNamespace(t, func(ns string) {
-                       operatorID := "camel-k-docker-hub"
-                       Expect(KamelInstallWithID(operatorID, ns,
-                               "--registry", "docker.io",
-                               "--organization", user,
-                               "--registry-auth-username", user,
-                               "--registry-auth-password", pass,
-                               "--cluster-type", "kubernetes").
-                               Execute()).To(Succeed())
-
-                       Expect(KamelRunWithID(operatorID, ns, 
"files/groovy.groovy").Execute()).To(Succeed())
-                       Eventually(IntegrationPodPhase(ns, "groovy"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
-                       Eventually(IntegrationLogs(ns, "groovy"), 
TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
-                       Eventually(IntegrationPodImage(ns, "groovy"), 
TestTimeoutShort).Should(HavePrefix("docker.io"))
-
-                       Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
-               })
-       }
-}
diff --git a/e2e/global/builder/files/Java.java 
b/e2e/global/builder/files/Java.java
deleted file mode 100644
index 66fef5fe8..000000000
--- a/e2e/global/builder/files/Java.java
+++ /dev/null
@@ -1,28 +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.
- */
-
-import org.apache.camel.builder.RouteBuilder;
-
-public class Java extends RouteBuilder {
-  @Override
-  public void configure() throws Exception {
-         from("timer:tick")
-         .setHeader("m").constant("string!")
-         .setBody().simple("Magic${header.m}")
-      .log("${body}");
-  }
-}
diff --git a/e2e/global/builder/github_packages_test.go 
b/e2e/global/builder/github_packages_test.go
deleted file mode 100644
index 6d2554d44..000000000
--- a/e2e/global/builder/github_packages_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-//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 builder
-
-import (
-       "os"
-       "testing"
-
-       v1 "k8s.io/api/core/v1"
-
-       . "github.com/onsi/gomega"
-
-       . "github.com/apache/camel-k/e2e/support"
-)
-
-func TestRunWithGithubPackagesRegistry(t *testing.T) {
-       user := os.Getenv("TEST_GITHUB_PACKAGES_USERNAME")
-       pass := os.Getenv("TEST_GITHUB_PACKAGES_PASSWORD")
-       repo := os.Getenv("TEST_GITHUB_PACKAGES_REPO")
-       if user == "" || pass == "" || repo == "" {
-               t.Skip("no github packages data: skipping")
-       } else {
-               WithNewTestNamespace(t, func(ns string) {
-                       operatorID := "camel-k-github-registry"
-                       Expect(KamelInstallWithID(operatorID, ns,
-                               "--registry", "docker.pkg.github.com",
-                               "--organization", repo,
-                               "--registry-auth-username", user,
-                               "--registry-auth-password", pass,
-                               "--cluster-type", "kubernetes").
-                               Execute()).To(Succeed())
-
-                       Expect(KamelRunWithID(operatorID, ns, 
"files/groovy.groovy").Execute()).To(Succeed())
-                       Eventually(IntegrationPodPhase(ns, "groovy"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
-                       Eventually(IntegrationLogs(ns, "groovy"), 
TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
-                       Eventually(IntegrationPodImage(ns, "groovy"), 
TestTimeoutShort).Should(HavePrefix("docker.pkg.github.com"))
-
-                       Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
-               })
-       }
-}
diff --git a/e2e/global/builder/registry_test.go 
b/e2e/global/builder/registry_test.go
new file mode 100644
index 000000000..278e3e009
--- /dev/null
+++ b/e2e/global/builder/registry_test.go
@@ -0,0 +1,89 @@
+//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 builder
+
+import (
+       "os"
+       "testing"
+
+       . "github.com/onsi/gomega"
+
+       v1 "k8s.io/api/core/v1"
+
+       . "github.com/apache/camel-k/e2e/support"
+)
+
+func TestRunWithDockerHubRegistry(t *testing.T) {
+       user := os.Getenv("TEST_DOCKER_HUB_USERNAME")
+       pass := os.Getenv("TEST_DOCKER_HUB_PASSWORD")
+       if user == "" || pass == "" {
+               t.Skip("no docker hub credentials: skipping")
+               return
+       }
+
+       WithNewTestNamespace(t, func(ns string) {
+               operatorID := "camel-k-docker-hub"
+               Expect(KamelInstallWithID(operatorID, ns,
+                       "--registry", "docker.io",
+                       "--organization", user,
+                       "--registry-auth-username", user,
+                       "--registry-auth-password", pass,
+                       "--cluster-type", "kubernetes").
+                       Execute()).To(Succeed())
+
+               Expect(KamelRunWithID(operatorID, ns, 
"files/groovy.groovy").Execute()).To(Succeed())
+               Eventually(IntegrationPodPhase(ns, "groovy"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
+               Eventually(IntegrationLogs(ns, "groovy"), 
TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
+               Eventually(IntegrationPodImage(ns, "groovy"), 
TestTimeoutShort).Should(HavePrefix("docker.io"))
+
+               Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+       })
+}
+
+func TestRunWithGithubPackagesRegistry(t *testing.T) {
+       user := os.Getenv("TEST_GITHUB_PACKAGES_USERNAME")
+       pass := os.Getenv("TEST_GITHUB_PACKAGES_PASSWORD")
+       repo := os.Getenv("TEST_GITHUB_PACKAGES_REPO")
+       if user == "" || pass == "" || repo == "" {
+               t.Skip("no github packages data: skipping")
+               return
+       }
+
+       WithNewTestNamespace(t, func(ns string) {
+               operatorID := "camel-k-github-registry"
+               Expect(KamelInstallWithID(operatorID, ns,
+                       "--registry", "docker.pkg.github.com",
+                       "--organization", repo,
+                       "--registry-auth-username", user,
+                       "--registry-auth-password", pass,
+                       "--cluster-type", "kubernetes").
+                       Execute()).To(Succeed())
+
+               Expect(KamelRunWithID(operatorID, ns, 
"files/groovy.groovy").Execute()).To(Succeed())
+               Eventually(IntegrationPodPhase(ns, "groovy"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
+               Eventually(IntegrationLogs(ns, "groovy"), 
TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
+               Eventually(IntegrationPodImage(ns, "groovy"), 
TestTimeoutShort).Should(HavePrefix("docker.pkg.github.com"))
+
+               Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+       })
+}

Reply via email to