From 5c7a2915a8012c0f39332722b8319c9e4c91e382 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 20 Mar 2024 15:44:21 -0400 Subject: [PATCH] Fix AssetManager startup retry Signed-off-by: Nicko Guyer --- internal/assets/manager.go | 12 ++++++------ internal/assets/manager_test.go | 6 +++--- internal/orchestrator/orchestrator.go | 6 +++--- internal/orchestrator/orchestrator_test.go | 14 ++------------ mocks/apiservermocks/ffi_swagger_gen.go | 2 +- mocks/apiservermocks/server.go | 2 +- mocks/assetmocks/manager.go | 16 ++++++++++------ mocks/batchmocks/manager.go | 2 +- .../firefly_subscriptions.go | 2 +- mocks/blockchainmocks/callbacks.go | 2 +- mocks/blockchainmocks/plugin.go | 8 ++++++-- mocks/broadcastmocks/manager.go | 2 +- mocks/cachemocks/manager.go | 2 +- mocks/contractmocks/manager.go | 2 +- mocks/coremocks/operation_callbacks.go | 2 +- mocks/databasemocks/callbacks.go | 2 +- mocks/databasemocks/plugin.go | 2 +- mocks/dataexchangemocks/callbacks.go | 2 +- mocks/dataexchangemocks/dx_event.go | 2 +- mocks/dataexchangemocks/plugin.go | 2 +- mocks/datamocks/manager.go | 2 +- mocks/definitionsmocks/handler.go | 2 +- mocks/definitionsmocks/sender.go | 2 +- mocks/eventmocks/event_manager.go | 2 +- mocks/eventsmocks/callbacks.go | 2 +- mocks/eventsmocks/plugin.go | 2 +- mocks/identitymanagermocks/manager.go | 2 +- mocks/identitymocks/callbacks.go | 2 +- mocks/identitymocks/plugin.go | 2 +- mocks/metricsmocks/manager.go | 2 +- mocks/multipartymocks/manager.go | 2 +- mocks/namespacemocks/manager.go | 2 +- mocks/networkmapmocks/manager.go | 2 +- mocks/operationmocks/manager.go | 2 +- mocks/orchestratormocks/orchestrator.go | 2 +- mocks/privatemessagingmocks/manager.go | 2 +- mocks/shareddownloadmocks/callbacks.go | 2 +- mocks/shareddownloadmocks/manager.go | 2 +- mocks/sharedstoragemocks/callbacks.go | 2 +- mocks/sharedstoragemocks/plugin.go | 2 +- mocks/spieventsmocks/manager.go | 2 +- mocks/syncasyncmocks/bridge.go | 2 +- mocks/syncasyncmocks/sender.go | 2 +- mocks/systemeventmocks/event_interface.go | 2 +- mocks/tokenmocks/callbacks.go | 2 +- mocks/tokenmocks/plugin.go | 12 ++++++++++-- mocks/txcommonmocks/helper.go | 2 +- mocks/txwritermocks/writer.go | 2 +- mocks/websocketsmocks/web_sockets_namespaced.go | 2 +- mocks/wsmocks/ws_client.go | 2 +- 50 files changed, 83 insertions(+), 77 deletions(-) diff --git a/internal/assets/manager.go b/internal/assets/manager.go index e7f84669e..605e9738f 100644 --- a/internal/assets/manager.go +++ b/internal/assets/manager.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -73,7 +73,7 @@ type Manager interface { RunOperation(ctx context.Context, op *core.PreparedOperation) (outputs fftypes.JSONObject, phase core.OpPhase, err error) // Starts the namespace on each of the configured token plugins - Start(ctx context.Context) error + Start() error } type assetManager struct { @@ -173,9 +173,9 @@ func (am *assetManager) GetTokenConnectors(ctx context.Context) []*core.TokenCon return connectors } -func (am *assetManager) Start(ctx context.Context) error { - f := database.TokenPoolQueryFactory.NewFilter(ctx).And() - pools, _, err := am.database.GetTokenPools(ctx, am.namespace, f) +func (am *assetManager) Start() error { + f := database.TokenPoolQueryFactory.NewFilter(am.ctx).And() + pools, _, err := am.database.GetTokenPools(am.ctx, am.namespace, f) if err != nil { return err } @@ -187,7 +187,7 @@ func (am *assetManager) Start(ctx context.Context) error { activePools = append(activePools, pool) } } - err := plugin.StartNamespace(ctx, am.namespace, activePools) + err := plugin.StartNamespace(am.ctx, am.namespace, activePools) if err != nil { return err } diff --git a/internal/assets/manager_test.go b/internal/assets/manager_test.go index 5ccde266b..93f4c191f 100644 --- a/internal/assets/manager_test.go +++ b/internal/assets/manager_test.go @@ -188,7 +188,7 @@ func TestStart(t *testing.T) { txHelper, _ := txcommon.NewTransactionHelper(context.Background(), "ns1", mdi, mdm, cmi) am, err := NewAssetManager(context.Background(), "ns1", "blockchain_plugin", mdi, map[string]tokens.Plugin{"magic-tokens": mti}, mim, msa, mbm, mpm, mm, mom, mcm, txHelper, cmi) assert.NoError(t, err) - err = am.Start(context.Background()) + err = am.Start() assert.NoError(t, err) } @@ -211,7 +211,7 @@ func TestStartDBError(t *testing.T) { txHelper, _ := txcommon.NewTransactionHelper(context.Background(), "ns1", mdi, mdm, cmi) am, err := NewAssetManager(context.Background(), "ns1", "blockchain_plugin", mdi, map[string]tokens.Plugin{"magic-tokens": mti}, mim, msa, mbm, mpm, mm, mom, mcm, txHelper, cmi) assert.NoError(t, err) - err = am.Start(context.Background()) + err = am.Start() assert.Regexp(t, "pop", err) } @@ -241,6 +241,6 @@ func TestStartError(t *testing.T) { txHelper, _ := txcommon.NewTransactionHelper(context.Background(), "ns1", mdi, mdm, cmi) am, err := NewAssetManager(context.Background(), "ns1", "blockchain_plugin", mdi, map[string]tokens.Plugin{"magic-tokens": mti}, mim, msa, mbm, mpm, mm, mom, mcm, txHelper, cmi) assert.NoError(t, err) - err = am.Start(context.Background()) + err = am.Start() assert.Regexp(t, "pop", err) } diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go index 7b2738997..fd5302024 100644 --- a/internal/orchestrator/orchestrator.go +++ b/internal/orchestrator/orchestrator.go @@ -297,6 +297,9 @@ func (or *orchestrator) Start() (err error) { if err == nil { or.txWriter.Start() } + if err == nil { + err = or.assets.Start() + } or.started = true return err @@ -544,9 +547,6 @@ func (or *orchestrator) initManagers(ctx context.Context) (err error) { if err != nil { return err } - if err := or.assets.Start(ctx); err != nil { - return err - } } if or.defsender == nil { diff --git a/internal/orchestrator/orchestrator_test.go b/internal/orchestrator/orchestrator_test.go index e7ddff253..6c2cc85e6 100644 --- a/internal/orchestrator/orchestrator_test.go +++ b/internal/orchestrator/orchestrator_test.go @@ -305,18 +305,6 @@ func TestInitMessagingComponentFail(t *testing.T) { assert.Regexp(t, "FF10128", err) } -func TestInitTokensFail(t *testing.T) { - or := newTestOrchestrator() - defer or.cleanup(t) - or.assets = nil - or.mom.On("RegisterHandler", mock.Anything, mock.Anything, mock.Anything) - or.mmp.On("ConfigureContract", mock.Anything).Return(nil) - or.mdi.On("GetTokenPools", mock.Anything, "ns", mock.Anything).Return([]*core.TokenPool{}, nil, nil) - or.mti.On("StartNamespace", mock.Anything, "ns", mock.Anything).Return(fmt.Errorf("pop")) - err := or.initManagers(context.Background()) - assert.Regexp(t, "pop", err) -} - func TestInitEventsComponentFail(t *testing.T) { or := newTestOrchestrator() defer or.cleanup(t) @@ -496,6 +484,7 @@ func TestStartStopOk(t *testing.T) { or.msd.On("Start").Return(nil) or.mom.On("Start").Return(nil) or.mtw.On("Start").Return() + or.mam.On("Start").Return(nil) or.mba.On("WaitStop").Return(nil) or.mbm.On("WaitStop").Return(nil) or.mdm.On("WaitStop").Return(nil) @@ -518,6 +507,7 @@ func TestStartStopOk(t *testing.T) { or.msd.On("Start").Return(nil) or.mom.On("Start").Return(nil) or.mtw.On("Start").Return() + or.mam.On("Start").Return(nil) or.mba.On("WaitStop").Return(nil) or.mbm.On("WaitStop").Return(nil) or.mdm.On("WaitStop").Return(nil) diff --git a/mocks/apiservermocks/ffi_swagger_gen.go b/mocks/apiservermocks/ffi_swagger_gen.go index fa0cf0838..0751f3f27 100644 --- a/mocks/apiservermocks/ffi_swagger_gen.go +++ b/mocks/apiservermocks/ffi_swagger_gen.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package apiservermocks diff --git a/mocks/apiservermocks/server.go b/mocks/apiservermocks/server.go index 6b73db0b8..97593c40d 100644 --- a/mocks/apiservermocks/server.go +++ b/mocks/apiservermocks/server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package apiservermocks diff --git a/mocks/assetmocks/manager.go b/mocks/assetmocks/manager.go index dcbf9bf53..8b95588cc 100644 --- a/mocks/assetmocks/manager.go +++ b/mocks/assetmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package assetmocks @@ -663,13 +663,17 @@ func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) return r0, r1, r2 } -// Start provides a mock function with given fields: ctx -func (_m *Manager) Start(ctx context.Context) error { - ret := _m.Called(ctx) +// Start provides a mock function with given fields: +func (_m *Manager) Start() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Start") + } var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() } else { r0 = ret.Error(0) } diff --git a/mocks/batchmocks/manager.go b/mocks/batchmocks/manager.go index c938d70a7..090367320 100644 --- a/mocks/batchmocks/manager.go +++ b/mocks/batchmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package batchmocks diff --git a/mocks/blockchaincommonmocks/firefly_subscriptions.go b/mocks/blockchaincommonmocks/firefly_subscriptions.go index c8ce82366..a41334e63 100644 --- a/mocks/blockchaincommonmocks/firefly_subscriptions.go +++ b/mocks/blockchaincommonmocks/firefly_subscriptions.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package blockchaincommonmocks diff --git a/mocks/blockchainmocks/callbacks.go b/mocks/blockchainmocks/callbacks.go index 0769667f6..0ee5cf387 100644 --- a/mocks/blockchainmocks/callbacks.go +++ b/mocks/blockchainmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package blockchainmocks diff --git a/mocks/blockchainmocks/plugin.go b/mocks/blockchainmocks/plugin.go index a39c66d24..3a9708174 100644 --- a/mocks/blockchainmocks/plugin.go +++ b/mocks/blockchainmocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package blockchainmocks @@ -571,7 +571,7 @@ func (_m *Plugin) StartNamespace(ctx context.Context, namespace string) error { ret := _m.Called(ctx, namespace) if len(ret) == 0 { - panic("no return value specified for Start") + panic("no return value specified for StartNamespace") } var r0 error @@ -588,6 +588,10 @@ func (_m *Plugin) StartNamespace(ctx context.Context, namespace string) error { func (_m *Plugin) StopNamespace(ctx context.Context, namespace string) error { ret := _m.Called(ctx, namespace) + if len(ret) == 0 { + panic("no return value specified for StopNamespace") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, namespace) diff --git a/mocks/broadcastmocks/manager.go b/mocks/broadcastmocks/manager.go index 76b9fcefc..4d7158747 100644 --- a/mocks/broadcastmocks/manager.go +++ b/mocks/broadcastmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package broadcastmocks diff --git a/mocks/cachemocks/manager.go b/mocks/cachemocks/manager.go index d8569e249..dee91e14f 100644 --- a/mocks/cachemocks/manager.go +++ b/mocks/cachemocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package cachemocks diff --git a/mocks/contractmocks/manager.go b/mocks/contractmocks/manager.go index 042061c6f..3d53ea10e 100644 --- a/mocks/contractmocks/manager.go +++ b/mocks/contractmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package contractmocks diff --git a/mocks/coremocks/operation_callbacks.go b/mocks/coremocks/operation_callbacks.go index c628ce6a4..f404e0506 100644 --- a/mocks/coremocks/operation_callbacks.go +++ b/mocks/coremocks/operation_callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package coremocks diff --git a/mocks/databasemocks/callbacks.go b/mocks/databasemocks/callbacks.go index ff790d9eb..5b936ba7c 100644 --- a/mocks/databasemocks/callbacks.go +++ b/mocks/databasemocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package databasemocks diff --git a/mocks/databasemocks/plugin.go b/mocks/databasemocks/plugin.go index ad1c54eb7..6cb9f1b0f 100644 --- a/mocks/databasemocks/plugin.go +++ b/mocks/databasemocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package databasemocks diff --git a/mocks/dataexchangemocks/callbacks.go b/mocks/dataexchangemocks/callbacks.go index 2d11b72f6..bdfa4370c 100644 --- a/mocks/dataexchangemocks/callbacks.go +++ b/mocks/dataexchangemocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package dataexchangemocks diff --git a/mocks/dataexchangemocks/dx_event.go b/mocks/dataexchangemocks/dx_event.go index 200fe5e71..c0cdcd3f7 100644 --- a/mocks/dataexchangemocks/dx_event.go +++ b/mocks/dataexchangemocks/dx_event.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package dataexchangemocks diff --git a/mocks/dataexchangemocks/plugin.go b/mocks/dataexchangemocks/plugin.go index e0e932143..c1671088c 100644 --- a/mocks/dataexchangemocks/plugin.go +++ b/mocks/dataexchangemocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package dataexchangemocks diff --git a/mocks/datamocks/manager.go b/mocks/datamocks/manager.go index aaf313950..e4395a3b7 100644 --- a/mocks/datamocks/manager.go +++ b/mocks/datamocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package datamocks diff --git a/mocks/definitionsmocks/handler.go b/mocks/definitionsmocks/handler.go index c67c6db42..3c226e186 100644 --- a/mocks/definitionsmocks/handler.go +++ b/mocks/definitionsmocks/handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package definitionsmocks diff --git a/mocks/definitionsmocks/sender.go b/mocks/definitionsmocks/sender.go index 28fd4736c..cbf22ec0c 100644 --- a/mocks/definitionsmocks/sender.go +++ b/mocks/definitionsmocks/sender.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package definitionsmocks diff --git a/mocks/eventmocks/event_manager.go b/mocks/eventmocks/event_manager.go index 7514bf1bb..13afc96fb 100644 --- a/mocks/eventmocks/event_manager.go +++ b/mocks/eventmocks/event_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package eventmocks diff --git a/mocks/eventsmocks/callbacks.go b/mocks/eventsmocks/callbacks.go index a018cbb77..676e06101 100644 --- a/mocks/eventsmocks/callbacks.go +++ b/mocks/eventsmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package eventsmocks diff --git a/mocks/eventsmocks/plugin.go b/mocks/eventsmocks/plugin.go index 72b9b9057..453592403 100644 --- a/mocks/eventsmocks/plugin.go +++ b/mocks/eventsmocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package eventsmocks diff --git a/mocks/identitymanagermocks/manager.go b/mocks/identitymanagermocks/manager.go index 6a0ed097d..2eb6b8e61 100644 --- a/mocks/identitymanagermocks/manager.go +++ b/mocks/identitymanagermocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package identitymanagermocks diff --git a/mocks/identitymocks/callbacks.go b/mocks/identitymocks/callbacks.go index d3445fa43..2f90520c7 100644 --- a/mocks/identitymocks/callbacks.go +++ b/mocks/identitymocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package identitymocks diff --git a/mocks/identitymocks/plugin.go b/mocks/identitymocks/plugin.go index 0d2c8e6b6..62ec273ba 100644 --- a/mocks/identitymocks/plugin.go +++ b/mocks/identitymocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package identitymocks diff --git a/mocks/metricsmocks/manager.go b/mocks/metricsmocks/manager.go index 9e59f8fd4..f1c968f47 100644 --- a/mocks/metricsmocks/manager.go +++ b/mocks/metricsmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package metricsmocks diff --git a/mocks/multipartymocks/manager.go b/mocks/multipartymocks/manager.go index c968b0bd1..74885e6f6 100644 --- a/mocks/multipartymocks/manager.go +++ b/mocks/multipartymocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package multipartymocks diff --git a/mocks/namespacemocks/manager.go b/mocks/namespacemocks/manager.go index b28d3e587..581956692 100644 --- a/mocks/namespacemocks/manager.go +++ b/mocks/namespacemocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package namespacemocks diff --git a/mocks/networkmapmocks/manager.go b/mocks/networkmapmocks/manager.go index 178021acc..015a8895a 100644 --- a/mocks/networkmapmocks/manager.go +++ b/mocks/networkmapmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package networkmapmocks diff --git a/mocks/operationmocks/manager.go b/mocks/operationmocks/manager.go index 7035ec6b9..4c5e99c4d 100644 --- a/mocks/operationmocks/manager.go +++ b/mocks/operationmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package operationmocks diff --git a/mocks/orchestratormocks/orchestrator.go b/mocks/orchestratormocks/orchestrator.go index 1ece33919..20e302bd3 100644 --- a/mocks/orchestratormocks/orchestrator.go +++ b/mocks/orchestratormocks/orchestrator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package orchestratormocks diff --git a/mocks/privatemessagingmocks/manager.go b/mocks/privatemessagingmocks/manager.go index 1d051d1f6..71859e10d 100644 --- a/mocks/privatemessagingmocks/manager.go +++ b/mocks/privatemessagingmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package privatemessagingmocks diff --git a/mocks/shareddownloadmocks/callbacks.go b/mocks/shareddownloadmocks/callbacks.go index 4348a9b63..5a1d25632 100644 --- a/mocks/shareddownloadmocks/callbacks.go +++ b/mocks/shareddownloadmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package shareddownloadmocks diff --git a/mocks/shareddownloadmocks/manager.go b/mocks/shareddownloadmocks/manager.go index aad3eedb3..e24548ac3 100644 --- a/mocks/shareddownloadmocks/manager.go +++ b/mocks/shareddownloadmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package shareddownloadmocks diff --git a/mocks/sharedstoragemocks/callbacks.go b/mocks/sharedstoragemocks/callbacks.go index 002173b5f..3a8938155 100644 --- a/mocks/sharedstoragemocks/callbacks.go +++ b/mocks/sharedstoragemocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package sharedstoragemocks diff --git a/mocks/sharedstoragemocks/plugin.go b/mocks/sharedstoragemocks/plugin.go index 44f92f32d..e1d8e4cb7 100644 --- a/mocks/sharedstoragemocks/plugin.go +++ b/mocks/sharedstoragemocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package sharedstoragemocks diff --git a/mocks/spieventsmocks/manager.go b/mocks/spieventsmocks/manager.go index 7286e9b58..405c4a27e 100644 --- a/mocks/spieventsmocks/manager.go +++ b/mocks/spieventsmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package spieventsmocks diff --git a/mocks/syncasyncmocks/bridge.go b/mocks/syncasyncmocks/bridge.go index 57b9fcded..2e67785cd 100644 --- a/mocks/syncasyncmocks/bridge.go +++ b/mocks/syncasyncmocks/bridge.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package syncasyncmocks diff --git a/mocks/syncasyncmocks/sender.go b/mocks/syncasyncmocks/sender.go index 8f68f26c9..879ccba37 100644 --- a/mocks/syncasyncmocks/sender.go +++ b/mocks/syncasyncmocks/sender.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package syncasyncmocks diff --git a/mocks/systemeventmocks/event_interface.go b/mocks/systemeventmocks/event_interface.go index 23db5f205..dd04220c4 100644 --- a/mocks/systemeventmocks/event_interface.go +++ b/mocks/systemeventmocks/event_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package systemeventmocks diff --git a/mocks/tokenmocks/callbacks.go b/mocks/tokenmocks/callbacks.go index 17104d652..5929ef0ed 100644 --- a/mocks/tokenmocks/callbacks.go +++ b/mocks/tokenmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package tokenmocks diff --git a/mocks/tokenmocks/plugin.go b/mocks/tokenmocks/plugin.go index c8a1d6759..79e641537 100644 --- a/mocks/tokenmocks/plugin.go +++ b/mocks/tokenmocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package tokenmocks @@ -121,6 +121,10 @@ func (_m *Plugin) CheckInterface(ctx context.Context, pool *core.TokenPool, meth func (_m *Plugin) ConnectorName() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ConnectorName") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -251,7 +255,7 @@ func (_m *Plugin) StartNamespace(ctx context.Context, namespace string, tokenPoo ret := _m.Called(ctx, namespace, tokenPools) if len(ret) == 0 { - panic("no return value specified for Start") + panic("no return value specified for StartNamespace") } var r0 error @@ -268,6 +272,10 @@ func (_m *Plugin) StartNamespace(ctx context.Context, namespace string, tokenPoo func (_m *Plugin) StopNamespace(ctx context.Context, namespace string) error { ret := _m.Called(ctx, namespace) + if len(ret) == 0 { + panic("no return value specified for StopNamespace") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, namespace) diff --git a/mocks/txcommonmocks/helper.go b/mocks/txcommonmocks/helper.go index 083bf6c9b..44af5281b 100644 --- a/mocks/txcommonmocks/helper.go +++ b/mocks/txcommonmocks/helper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package txcommonmocks diff --git a/mocks/txwritermocks/writer.go b/mocks/txwritermocks/writer.go index 7facf76e6..186bf8e4f 100644 --- a/mocks/txwritermocks/writer.go +++ b/mocks/txwritermocks/writer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package txwritermocks diff --git a/mocks/websocketsmocks/web_sockets_namespaced.go b/mocks/websocketsmocks/web_sockets_namespaced.go index 9c1e94c04..ee93753cc 100644 --- a/mocks/websocketsmocks/web_sockets_namespaced.go +++ b/mocks/websocketsmocks/web_sockets_namespaced.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package websocketsmocks diff --git a/mocks/wsmocks/ws_client.go b/mocks/wsmocks/ws_client.go index 00bbbcfaa..77712254f 100644 --- a/mocks/wsmocks/ws_client.go +++ b/mocks/wsmocks/ws_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package wsmocks