You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2022/10/18 04:16:48 UTC

[camel-k] branch main updated (faa0feb12 -> 26c169aa8)

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

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


    from faa0feb12 Updated CHANGELOG.md
     new 3eee9ee9c fix(e2e): fix minor issue in e2e upgrade util.go
     new b6be2503e fix(cmd): fix typos in kamelet_add_repo.go
     new 26c169aa8 fix(e2e): fix TestKameletFromCustomRepository

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 e2e/namespace/install/cli/kamelet_test.go | 17 ++++++++++++++---
 e2e/namespace/upgrade/util.go             |  2 +-
 pkg/cmd/kamelet_add_repo.go               | 12 ++++++------
 pkg/cmd/kamelet_remove_repo.go            |  4 ++--
 4 files changed, 23 insertions(+), 12 deletions(-)


[camel-k] 02/03: fix(cmd): fix typos in kamelet_add_repo.go

Posted by ts...@apache.org.
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 b6be2503e4a5cdd8fe66f201a22f81d0db46aa91
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Mon Oct 17 18:51:17 2022 +0900

    fix(cmd): fix typos in kamelet_add_repo.go
---
 pkg/cmd/kamelet_add_repo.go    | 12 ++++++------
 pkg/cmd/kamelet_remove_repo.go |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/pkg/cmd/kamelet_add_repo.go b/pkg/cmd/kamelet_add_repo.go
index f7f8b6d9f..bb70f569b 100644
--- a/pkg/cmd/kamelet_add_repo.go
+++ b/pkg/cmd/kamelet_add_repo.go
@@ -80,9 +80,9 @@ func (o *kameletAddRepoCommandOptions) run(cmd *cobra.Command, args []string) er
 	}
 	var platform *v1.IntegrationPlatform
 	if o.OperatorID == "" {
-		platform, err = o.findIntegrationPlatorm(cmd, c)
+		platform, err = o.findIntegrationPlatform(cmd, c)
 	} else {
-		platform, err = o.getIntegrationPlatorm(cmd, c)
+		platform, err = o.getIntegrationPlatform(cmd, c)
 	}
 	if err != nil {
 		return err
@@ -100,8 +100,8 @@ func (o *kameletAddRepoCommandOptions) run(cmd *cobra.Command, args []string) er
 	return c.Update(o.Context, platform)
 }
 
-// getIntegrationPlatorm gives the integration plaform matching with the operator id in the provided namespace.
-func (o *kameletUpdateRepoCommandOptions) getIntegrationPlatorm(cmd *cobra.Command, c client.Client) (*v1.IntegrationPlatform, error) {
+// getIntegrationPlatform gives the integration platform matching with the operator id in the provided namespace.
+func (o *kameletUpdateRepoCommandOptions) getIntegrationPlatform(cmd *cobra.Command, c client.Client) (*v1.IntegrationPlatform, error) {
 	key := client.ObjectKey{
 		Namespace: o.Namespace,
 		Name:      o.OperatorID,
@@ -118,8 +118,8 @@ func (o *kameletUpdateRepoCommandOptions) getIntegrationPlatorm(cmd *cobra.Comma
 	return &platform, nil
 }
 
-// findIntegrationPlatorm gives the primary integration plaform that could be found in the provided namespace.
-func (o *kameletUpdateRepoCommandOptions) findIntegrationPlatorm(cmd *cobra.Command, c client.Client) (*v1.IntegrationPlatform, error) {
+// findIntegrationPlatform gives the primary integration platform that could be found in the provided namespace.
+func (o *kameletUpdateRepoCommandOptions) findIntegrationPlatform(cmd *cobra.Command, c client.Client) (*v1.IntegrationPlatform, error) {
 	platforms, err := platformutil.ListPrimaryPlatforms(o.Context, c, o.Namespace)
 	if err != nil {
 		return nil, err
diff --git a/pkg/cmd/kamelet_remove_repo.go b/pkg/cmd/kamelet_remove_repo.go
index 18703681f..1e7614881 100644
--- a/pkg/cmd/kamelet_remove_repo.go
+++ b/pkg/cmd/kamelet_remove_repo.go
@@ -68,9 +68,9 @@ func (o *kameletRemoveRepoCommandOptions) run(cmd *cobra.Command, args []string)
 	}
 	var platform *v1.IntegrationPlatform
 	if o.OperatorID == "" {
-		platform, err = o.findIntegrationPlatorm(cmd, c)
+		platform, err = o.findIntegrationPlatform(cmd, c)
 	} else {
-		platform, err = o.getIntegrationPlatorm(cmd, c)
+		platform, err = o.getIntegrationPlatform(cmd, c)
 	}
 	if err != nil {
 		return err


[camel-k] 03/03: fix(e2e): fix TestKameletFromCustomRepository

Posted by ts...@apache.org.
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 26c169aa8ac9bac38410e8b375e4bbc5f0bb8737
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Mon Oct 17 18:53:17 2022 +0900

    fix(e2e): fix TestKameletFromCustomRepository
---
 e2e/namespace/install/cli/kamelet_test.go | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/e2e/namespace/install/cli/kamelet_test.go b/e2e/namespace/install/cli/kamelet_test.go
index cf70b39ae..3a48ea918 100644
--- a/e2e/namespace/install/cli/kamelet_test.go
+++ b/e2e/namespace/install/cli/kamelet_test.go
@@ -30,12 +30,16 @@ import (
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/e2e/support"
+	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 )
 
+// This test requires operator installation with a custom operator ID, thus needs
+// to be run under e2e/namespace.
 func TestKameletFromCustomRepository(t *testing.T) {
 	WithNewTestNamespace(t, func(ns string) {
 		operatorID := fmt.Sprintf("camel-k-%s", ns)
 		Expect(KamelInstallWithID(operatorID, ns).Execute()).To(Succeed())
+		Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
 
 		kameletName := "timer-custom-source"
 		removeKamelet(kameletName, ns)
@@ -43,15 +47,22 @@ func TestKameletFromCustomRepository(t *testing.T) {
 		Eventually(Kamelet(kameletName, ns)).Should(BeNil())
 
 		// Add the custom repository
-		Expect(Kamel("kamelet", "add-repo", "github:apache/camel-k/e2e/global/common/files/kamelets", "-n", ns, "-x", operatorID).Execute()).To(Succeed())
+		Expect(Kamel("kamelet", "add-repo",
+			"github:apache/camel-k/e2e/global/common/files/kamelets",
+			"-n", ns,
+			"-x", operatorID).Execute()).To(Succeed())
 
 		Expect(KamelRunWithID(operatorID, ns, "files/TimerCustomKameletIntegration.java").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "timer-custom-kamelet-integration"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
+		Eventually(IntegrationPodPhase(ns, "timer-custom-kamelet-integration"), TestTimeoutLong).
+			Should(Equal(corev1.PodRunning))
 
 		Eventually(IntegrationLogs(ns, "timer-custom-kamelet-integration")).Should(ContainSubstring("hello world"))
 
 		// Remove the custom repository
-		Expect(Kamel("kamelet", "remove-repo", "github:apache/camel-k/e2e/global/common/files/kamelets", "-n", ns, "-x", operatorID).Execute()).To(Succeed())
+		Expect(Kamel("kamelet", "remove-repo",
+			"github:apache/camel-k/e2e/global/common/files/kamelets",
+			"-n", ns,
+			"-x", operatorID).Execute()).To(Succeed())
 	})
 }
 


[camel-k] 01/03: fix(e2e): fix minor issue in e2e upgrade util.go

Posted by ts...@apache.org.
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 3eee9ee9ccc514627e4f3658bfa27a47e1cf2783
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Fri Oct 14 13:15:20 2022 +0900

    fix(e2e): fix minor issue in e2e upgrade util.go
---
 e2e/namespace/upgrade/util.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/e2e/namespace/upgrade/util.go b/e2e/namespace/upgrade/util.go
index 7707ca72c..771d09cac 100644
--- a/e2e/namespace/upgrade/util.go
+++ b/e2e/namespace/upgrade/util.go
@@ -141,7 +141,7 @@ func catalogSourcePod(ns, csName string) func() *corev1.Pod {
 }
 
 func catalogSourcePodRunning(ns, csName string) error {
-	podFunc := catalogSourcePod(ns, installCatalogSourceName)
+	podFunc := catalogSourcePod(ns, csName)
 
 	for i := 1; i < 5; i++ {
 		csPod := podFunc()