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

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

commit efdded21d328de2fb001a483190d5268a68be1b2
Author: phantomjinx <[email protected]>
AuthorDate: Thu Jan 27 10:47:51 2022 +0000

    Make upgrade tests more reliable
    
    * Await the integration is up and running again after rebuild
      before checking its version
    
    * Slow down the kamel installation requests as errors are
      being returned concerning CRDs not being the latest version
---
 e2e/upgrade/cli_upgrade_test.go | 4 ++--
 e2e/upgrade/olm_upgrade_test.go | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/e2e/upgrade/cli_upgrade_test.go b/e2e/upgrade/cli_upgrade_test.go
index 65415bb..f8f3eee 100644
--- a/e2e/upgrade/cli_upgrade_test.go
+++ b/e2e/upgrade/cli_upgrade_test.go
@@ -50,8 +50,8 @@ func TestOperatorUpgrade(t *testing.T) {
                // Set KAMEL_BIN only for this test - don't override the ENV 
variable for all tests
                Expect(os.Setenv("KAMEL_BIN", kamel)).To(Succeed())
 
-               Expect(Kamel("install", "--olm=false", "--cluster-setup", 
"--force").Execute()).To(Succeed())
-               Expect(Kamel("install", "--olm=false", "-n", 
ns).Execute()).To(Succeed())
+               // Should both install the CRDs and kamel in the given namespace
+               Expect(Kamel("install", "--olm=false", "--force", "-n", 
ns).Execute()).To(Succeed())
 
                // Check the operator pod is running
                Eventually(OperatorPodPhase(ns), 
TestTimeoutMedium).Should(Equal(corev1.PodRunning))
diff --git a/e2e/upgrade/olm_upgrade_test.go b/e2e/upgrade/olm_upgrade_test.go
index 6f6cde3..a2ff240 100644
--- a/e2e/upgrade/olm_upgrade_test.go
+++ b/e2e/upgrade/olm_upgrade_test.go
@@ -168,6 +168,10 @@ func TestOLMAutomaticUpgrade(t *testing.T) {
                        // Rebuild the Integration
                        Expect(Kamel("rebuild", name, "-n", 
ns).Execute()).To(Succeed())
 
+                       // Check the Integration runs correctly
+                       Eventually(IntegrationPodPhase(ns, name), 
TestTimeoutMedium).Should(Equal(corev1.PodRunning))
+                       Eventually(IntegrationConditionStatus(ns, name, 
v1.IntegrationConditionReady), 
TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
+
                        // Check the Integration version has been upgraded
                        Eventually(IntegrationVersion(ns, 
name)).Should(ContainSubstring(newIPVersionPrefix))
 

Reply via email to