From bec1bf55ef3ee751cb854481aa8a6a1272288279 Mon Sep 17 00:00:00 2001 From: Xu Deng Date: Thu, 14 Sep 2023 17:39:31 -0400 Subject: [PATCH] Allow reconciler retry downloading bundle as the secret may not be injected immediately (#982) --- pkg/bundle/manager.go | 2 +- pkg/bundle/manager_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/bundle/manager.go b/pkg/bundle/manager.go index 402a3905..7e7d9ceb 100644 --- a/pkg/bundle/manager.go +++ b/pkg/bundle/manager.go @@ -134,7 +134,7 @@ func (m *bundleManager) ProcessBundleController(ctx context.Context, pbc *api.Pa return fmt.Errorf("updating %s status to %s: %s", pbc.Name, pbc.Status.State, err) } } - return nil + return err } allBundles, err := m.bundleClient.GetBundleList(ctx) diff --git a/pkg/bundle/manager_test.go b/pkg/bundle/manager_test.go index 364df429..809210c3 100644 --- a/pkg/bundle/manager_test.go +++ b/pkg/bundle/manager_test.go @@ -302,7 +302,7 @@ func TestBundleManager_ProcessBundleController(t *testing.T) { err := bm.ProcessBundleController(ctx, pbc) - assert.NoError(t, err) + assert.Error(t, err) assert.Equal(t, api.BundleControllerStateDisconnected, pbc.Status.State) })