From 2a32cb1e6cca43b87ee73d2fa743ed4956203164 Mon Sep 17 00:00:00 2001 From: shenda1 Date: Fri, 13 Dec 2024 18:08:40 +0530 Subject: [PATCH] adding mock for ModifyReplicationRule Signed-off-by: shenda1 --- mocks/Client.go | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/mocks/Client.go b/mocks/Client.go index d138f0d..5fcf1c0 100644 --- a/mocks/Client.go +++ b/mocks/Client.go @@ -4364,6 +4364,34 @@ func (_m *Client) WearMetricsByDrive(ctx context.Context, entityID string, inter return r0, r1 } +// ModifyReplicationRule provides a mock function with given fields: ctx, modifyParams, id +func (_m *Client) ModifyReplicationRule(ctx context.Context, modifyParams *gopowerstore.ReplicationRuleModify, id string) (gopowerstore.EmptyResponse, error) { + ret := _m.Called(ctx, modifyParams, id) + + if len(ret) == 0 { + panic("no return value specified for ModifyReplicationRule") + } + + var r0 gopowerstore.EmptyResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *gopowerstore.ReplicationRuleModify, string) (gopowerstore.EmptyResponse, error)); ok { + return rf(ctx, modifyParams, id) + } + if rf, ok := ret.Get(0).(func(context.Context, *gopowerstore.ReplicationRuleModify, string) gopowerstore.EmptyResponse); ok { + r0 = rf(ctx, modifyParams, id) + } else { + r0 = ret.Get(0).(gopowerstore.EmptyResponse) + } + + if rf, ok := ret.Get(1).(func(context.Context, *gopowerstore.ReplicationRuleModify, string) error); ok { + r1 = rf(ctx, modifyParams, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { @@ -4377,4 +4405,4 @@ func NewClient(t interface { t.Cleanup(func() { mock.AssertExpectations(t) }) return mock -} +} \ No newline at end of file