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 <[email protected]> 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()) }) }
