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

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

commit 099b08a247d5299ad37ed2499f4650c0823017a3
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Thu Feb 23 11:47:31 2023 +0100

    chore: move kamelet repo test to advanced common
---
 .github/actions/e2e-common/exec-tests.sh           |  1 +
 .../files/TimerCustomKameletIntegration.java       |  0
 .../kamelet_repo_test.go                           | 43 ++++++++++++----------
 3 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/.github/actions/e2e-common/exec-tests.sh 
b/.github/actions/e2e-common/exec-tests.sh
index 69fff0375..296166607 100755
--- a/.github/actions/e2e-common/exec-tests.sh
+++ b/.github/actions/e2e-common/exec-tests.sh
@@ -137,6 +137,7 @@ fi
 # Then run all integration tests rather than ending on first failure
 set -e
 exit_code=0
+echo "${CUSTOM_INSTALL_TEST}"
 if [ "${CUSTOM_INSTALL_TEST}" == "true" ]; then
   DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make 
test-common-with-custom-install || exit_code=1
 else
diff --git a/e2e/common/cli/files/TimerCustomKameletIntegration.java 
b/e2e/commonwithcustominstall/files/TimerCustomKameletIntegration.java
similarity index 100%
rename from e2e/common/cli/files/TimerCustomKameletIntegration.java
rename to e2e/commonwithcustominstall/files/TimerCustomKameletIntegration.java
diff --git a/e2e/common/cli/kamelet_repo_test.go 
b/e2e/commonwithcustominstall/kamelet_repo_test.go
similarity index 53%
rename from e2e/common/cli/kamelet_repo_test.go
rename to e2e/commonwithcustominstall/kamelet_repo_test.go
index c1e87fe4e..c8609115d 100644
--- a/e2e/common/cli/kamelet_repo_test.go
+++ b/e2e/commonwithcustominstall/kamelet_repo_test.go
@@ -20,9 +20,10 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package cli
+package commonwithcustominstall
 
 import (
+       "fmt"
        "testing"
 
        . "github.com/onsi/gomega"
@@ -35,28 +36,32 @@ import (
 func TestKameletFromCustomRepository(t *testing.T) {
        RegisterTestingT(t)
 
-       Eventually(PlatformPhase(ns), 
TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
+       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)
+               kameletName := "timer-custom-source"
+               removeKamelet(kameletName, ns)
 
-       Eventually(Kamelet(kameletName, ns)).Should(BeNil())
-       // Add the custom repository
-       Expect(Kamel("kamelet", "add-repo",
-               "github:squakez/ck-kamelet-test-repo/kamelets",
-               "-n", ns,
-               "-x", operatorID).Execute()).To(Succeed())
+               Eventually(Kamelet(kameletName, ns)).Should(BeNil())
+               // Add the custom repository
+               Expect(Kamel("kamelet", "add-repo",
+                       "github:squakez/ck-kamelet-test-repo/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(IntegrationLogs(ns, 
"timer-custom-kamelet-integration")).Should(ContainSubstring("hello world"))
+               Expect(KamelRunWithID(operatorID, ns, 
"files/TimerCustomKameletIntegration.java").Execute()).To(Succeed())
+               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:squakez/ck-kamelet-test-repo/kamelets",
-               "-n", ns,
-               "-x", operatorID).Execute()).To(Succeed())
+               // Remove the custom repository
+               Expect(Kamel("kamelet", "remove-repo",
+                       "github:squakez/ck-kamelet-test-repo/kamelets",
+                       "-n", ns,
+                       "-x", operatorID).Execute()).To(Succeed())
+       })
 }
 
 func removeKamelet(name string, ns string) {

Reply via email to