|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
// Code generated by mockery v2.34.2. DO NOT EDIT.
|
|
|
|
|
// Code generated by mockery v2.42.1. DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package alertmanager_mock |
|
|
|
|
|
|
|
|
@ -34,6 +34,10 @@ func (_m *RemoteAlertmanagerMock) EXPECT() *RemoteAlertmanagerMock_Expecter { |
|
|
|
|
func (_m *RemoteAlertmanagerMock) ApplyConfig(_a0 context.Context, _a1 *models.AlertConfiguration) error { |
|
|
|
|
ret := _m.Called(_a0, _a1) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for ApplyConfig") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.AlertConfiguration) error); ok { |
|
|
|
|
r0 = rf(_a0, _a1) |
|
|
|
@ -73,42 +77,14 @@ func (_c *RemoteAlertmanagerMock_ApplyConfig_Call) RunAndReturn(run func(context |
|
|
|
|
return _c |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// CleanUp provides a mock function with given fields:
|
|
|
|
|
func (_m *RemoteAlertmanagerMock) CleanUp() { |
|
|
|
|
_m.Called() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// RemoteAlertmanagerMock_CleanUp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanUp'
|
|
|
|
|
type RemoteAlertmanagerMock_CleanUp_Call struct { |
|
|
|
|
*mock.Call |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// CleanUp is a helper method to define mock.On call
|
|
|
|
|
func (_e *RemoteAlertmanagerMock_Expecter) CleanUp() *RemoteAlertmanagerMock_CleanUp_Call { |
|
|
|
|
return &RemoteAlertmanagerMock_CleanUp_Call{Call: _e.mock.On("CleanUp")} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (_c *RemoteAlertmanagerMock_CleanUp_Call) Run(run func()) *RemoteAlertmanagerMock_CleanUp_Call { |
|
|
|
|
_c.Call.Run(func(args mock.Arguments) { |
|
|
|
|
run() |
|
|
|
|
}) |
|
|
|
|
return _c |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (_c *RemoteAlertmanagerMock_CleanUp_Call) Return() *RemoteAlertmanagerMock_CleanUp_Call { |
|
|
|
|
_c.Call.Return() |
|
|
|
|
return _c |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (_c *RemoteAlertmanagerMock_CleanUp_Call) RunAndReturn(run func()) *RemoteAlertmanagerMock_CleanUp_Call { |
|
|
|
|
_c.Call.Return(run) |
|
|
|
|
return _c |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// CompareAndSendConfiguration provides a mock function with given fields: _a0, _a1
|
|
|
|
|
func (_m *RemoteAlertmanagerMock) CompareAndSendConfiguration(_a0 context.Context, _a1 *models.AlertConfiguration) error { |
|
|
|
|
ret := _m.Called(_a0, _a1) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for CompareAndSendConfiguration") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.AlertConfiguration) error); ok { |
|
|
|
|
r0 = rf(_a0, _a1) |
|
|
|
@ -152,6 +128,10 @@ func (_c *RemoteAlertmanagerMock_CompareAndSendConfiguration_Call) RunAndReturn( |
|
|
|
|
func (_m *RemoteAlertmanagerMock) CompareAndSendState(_a0 context.Context) error { |
|
|
|
|
ret := _m.Called(_a0) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for CompareAndSendState") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) error); ok { |
|
|
|
|
r0 = rf(_a0) |
|
|
|
@ -194,6 +174,10 @@ func (_c *RemoteAlertmanagerMock_CompareAndSendState_Call) RunAndReturn(run func |
|
|
|
|
func (_m *RemoteAlertmanagerMock) CreateSilence(_a0 context.Context, _a1 *v2models.PostableSilence) (string, error) { |
|
|
|
|
ret := _m.Called(_a0, _a1) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for CreateSilence") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 string |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *v2models.PostableSilence) (string, error)); ok { |
|
|
|
@ -247,6 +231,10 @@ func (_c *RemoteAlertmanagerMock_CreateSilence_Call) RunAndReturn(run func(conte |
|
|
|
|
func (_m *RemoteAlertmanagerMock) DeleteSilence(_a0 context.Context, _a1 string) error { |
|
|
|
|
ret := _m.Called(_a0, _a1) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for DeleteSilence") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { |
|
|
|
|
r0 = rf(_a0, _a1) |
|
|
|
@ -290,6 +278,10 @@ func (_c *RemoteAlertmanagerMock_DeleteSilence_Call) RunAndReturn(run func(conte |
|
|
|
|
func (_m *RemoteAlertmanagerMock) GetAlertGroups(ctx context.Context, active bool, silenced bool, inhibited bool, filter []string, receiver string) (v2models.AlertGroups, error) { |
|
|
|
|
ret := _m.Called(ctx, active, silenced, inhibited, filter, receiver) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for GetAlertGroups") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 v2models.AlertGroups |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, bool, bool, bool, []string, string) (v2models.AlertGroups, error)); ok { |
|
|
|
@ -349,6 +341,10 @@ func (_c *RemoteAlertmanagerMock_GetAlertGroups_Call) RunAndReturn(run func(cont |
|
|
|
|
func (_m *RemoteAlertmanagerMock) GetAlerts(ctx context.Context, active bool, silenced bool, inhibited bool, filter []string, receiver string) (v2models.GettableAlerts, error) { |
|
|
|
|
ret := _m.Called(ctx, active, silenced, inhibited, filter, receiver) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for GetAlerts") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 v2models.GettableAlerts |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, bool, bool, bool, []string, string) (v2models.GettableAlerts, error)); ok { |
|
|
|
@ -408,6 +404,10 @@ func (_c *RemoteAlertmanagerMock_GetAlerts_Call) RunAndReturn(run func(context.C |
|
|
|
|
func (_m *RemoteAlertmanagerMock) GetReceivers(ctx context.Context) ([]v2models.Receiver, error) { |
|
|
|
|
ret := _m.Called(ctx) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for GetReceivers") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 []v2models.Receiver |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]v2models.Receiver, error)); ok { |
|
|
|
@ -462,6 +462,10 @@ func (_c *RemoteAlertmanagerMock_GetReceivers_Call) RunAndReturn(run func(contex |
|
|
|
|
func (_m *RemoteAlertmanagerMock) GetSilence(_a0 context.Context, _a1 string) (v2models.GettableSilence, error) { |
|
|
|
|
ret := _m.Called(_a0, _a1) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for GetSilence") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 v2models.GettableSilence |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) (v2models.GettableSilence, error)); ok { |
|
|
|
@ -515,6 +519,10 @@ func (_c *RemoteAlertmanagerMock_GetSilence_Call) RunAndReturn(run func(context. |
|
|
|
|
func (_m *RemoteAlertmanagerMock) GetStatus() definitions.GettableStatus { |
|
|
|
|
ret := _m.Called() |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for GetStatus") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 definitions.GettableStatus |
|
|
|
|
if rf, ok := ret.Get(0).(func() definitions.GettableStatus); ok { |
|
|
|
|
r0 = rf() |
|
|
|
@ -556,6 +564,10 @@ func (_c *RemoteAlertmanagerMock_GetStatus_Call) RunAndReturn(run func() definit |
|
|
|
|
func (_m *RemoteAlertmanagerMock) ListSilences(_a0 context.Context, _a1 []string) (v2models.GettableSilences, error) { |
|
|
|
|
ret := _m.Called(_a0, _a1) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for ListSilences") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 v2models.GettableSilences |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) (v2models.GettableSilences, error)); ok { |
|
|
|
@ -611,6 +623,10 @@ func (_c *RemoteAlertmanagerMock_ListSilences_Call) RunAndReturn(run func(contex |
|
|
|
|
func (_m *RemoteAlertmanagerMock) PutAlerts(_a0 context.Context, _a1 definitions.PostableAlerts) error { |
|
|
|
|
ret := _m.Called(_a0, _a1) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for PutAlerts") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, definitions.PostableAlerts) error); ok { |
|
|
|
|
r0 = rf(_a0, _a1) |
|
|
|
@ -654,6 +670,10 @@ func (_c *RemoteAlertmanagerMock_PutAlerts_Call) RunAndReturn(run func(context.C |
|
|
|
|
func (_m *RemoteAlertmanagerMock) Ready() bool { |
|
|
|
|
ret := _m.Called() |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for Ready") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 bool |
|
|
|
|
if rf, ok := ret.Get(0).(func() bool); ok { |
|
|
|
|
r0 = rf() |
|
|
|
@ -695,6 +715,10 @@ func (_c *RemoteAlertmanagerMock_Ready_Call) RunAndReturn(run func() bool) *Remo |
|
|
|
|
func (_m *RemoteAlertmanagerMock) SaveAndApplyConfig(ctx context.Context, config *definitions.PostableUserConfig) error { |
|
|
|
|
ret := _m.Called(ctx, config) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for SaveAndApplyConfig") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *definitions.PostableUserConfig) error); ok { |
|
|
|
|
r0 = rf(ctx, config) |
|
|
|
@ -738,6 +762,10 @@ func (_c *RemoteAlertmanagerMock_SaveAndApplyConfig_Call) RunAndReturn(run func( |
|
|
|
|
func (_m *RemoteAlertmanagerMock) SaveAndApplyDefaultConfig(ctx context.Context) error { |
|
|
|
|
ret := _m.Called(ctx) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for SaveAndApplyDefaultConfig") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) error); ok { |
|
|
|
|
r0 = rf(ctx) |
|
|
|
@ -812,6 +840,10 @@ func (_c *RemoteAlertmanagerMock_StopAndWait_Call) RunAndReturn(run func()) *Rem |
|
|
|
|
func (_m *RemoteAlertmanagerMock) TestReceivers(ctx context.Context, c definitions.TestReceiversConfigBodyParams) (*notifier.TestReceiversResult, error) { |
|
|
|
|
ret := _m.Called(ctx, c) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for TestReceivers") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 *notifier.TestReceiversResult |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, definitions.TestReceiversConfigBodyParams) (*notifier.TestReceiversResult, error)); ok { |
|
|
|
@ -867,6 +899,10 @@ func (_c *RemoteAlertmanagerMock_TestReceivers_Call) RunAndReturn(run func(conte |
|
|
|
|
func (_m *RemoteAlertmanagerMock) TestTemplate(ctx context.Context, c definitions.TestTemplatesConfigBodyParams) (*notify.TestTemplatesResults, error) { |
|
|
|
|
ret := _m.Called(ctx, c) |
|
|
|
|
|
|
|
|
|
if len(ret) == 0 { |
|
|
|
|
panic("no return value specified for TestTemplate") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var r0 *notify.TestTemplatesResults |
|
|
|
|
var r1 error |
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, definitions.TestTemplatesConfigBodyParams) (*notify.TestTemplatesResults, error)); ok { |
|
|
|
|