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/07 03:48:15 UTC

[camel-k] 13/13: fix(e2e): Stop go panic if pod or pod status is not initialised

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 d82ae431e6ecdb541c6afa17b68849b586d0d71a
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Tue Oct 4 12:19:51 2022 +0100

    fix(e2e): Stop go panic if pod or pod status is not initialised
    
    * While checking for the catalogue source pod, the function needs to
      assume that the pod may not yet exist.
---
 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 42da566cc..7707ca72c 100644
--- a/e2e/namespace/upgrade/util.go
+++ b/e2e/namespace/upgrade/util.go
@@ -145,7 +145,7 @@ func catalogSourcePodRunning(ns, csName string) error {
 
 	for i := 1; i < 5; i++ {
 		csPod := podFunc()
-		if csPod.Status.Phase == "Running" {
+		if csPod != nil && csPod.Status.Phase == "Running" {
 			return nil // Pod good to go
 		}