From 37d01a694449d27b7e85404645bb9de91fa1caf1 Mon Sep 17 00:00:00 2001 From: Rory Z Date: Thu, 4 Aug 2022 10:40:37 +0800 Subject: [PATCH] test: fix e2e test error --- controllers/apps/v2alpha1/emqx_controller.go | 2 +- e2e/v2alpha1/suite_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/apps/v2alpha1/emqx_controller.go b/controllers/apps/v2alpha1/emqx_controller.go index f75615261..1e95346da 100644 --- a/controllers/apps/v2alpha1/emqx_controller.go +++ b/controllers/apps/v2alpha1/emqx_controller.go @@ -143,7 +143,7 @@ func (r *EMQXReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. } if deploy := generateDeployment(instance); deploy != nil { - if instance.Status.IsCoreUpdating() { + if instance.Status.IsCoreUpdating() && instance.Status.OriginalImage != "" { deploy.Spec.Template.Spec.Containers[0].Image = instance.Status.OriginalImage } resources = append(resources, deploy) diff --git a/e2e/v2alpha1/suite_test.go b/e2e/v2alpha1/suite_test.go index b892971ca..7566fd6bb 100644 --- a/e2e/v2alpha1/suite_test.go +++ b/e2e/v2alpha1/suite_test.go @@ -59,7 +59,7 @@ func TestAPIs(t *testing.T) { } var _ = BeforeSuite(func() { - timeout = time.Minute * 7 + timeout = time.Minute * 5 interval = time.Second * 1 Expect(os.Setenv("USE_EXISTING_CLUSTER", "true")).To(Succeed())