2019-04-24 21:52:08 +00:00
|
|
|
// Code generated by MockGen. DO NOT EDIT.
|
2021-08-11 01:04:35 +00:00
|
|
|
// Source: github.com/authelia/authelia/v4/internal/notification (interfaces: Notifier)
|
2019-04-24 21:52:08 +00:00
|
|
|
|
2021-12-01 12:11:29 +00:00
|
|
|
// Package mocks is a generated GoMock package.
|
2019-04-24 21:52:08 +00:00
|
|
|
package mocks
|
|
|
|
|
|
|
|
import (
|
2022-12-23 05:06:49 +00:00
|
|
|
context "context"
|
2022-07-18 00:56:09 +00:00
|
|
|
mail "net/mail"
|
2019-04-24 21:52:08 +00:00
|
|
|
reflect "reflect"
|
|
|
|
|
2022-12-23 05:06:49 +00:00
|
|
|
templates "github.com/authelia/authelia/v4/internal/templates"
|
2023-03-06 03:58:50 +00:00
|
|
|
gomock "github.com/golang/mock/gomock"
|
2019-04-24 21:52:08 +00:00
|
|
|
)
|
|
|
|
|
[FEATURE] Notifier Startup Checks (#889)
* implement SMTP notifier startup check
* check dial, starttls, auth, mail from, rcpt to, reset, and quit
* log the error on failure
* implement mock
* misc optimizations, adjustments, and refactoring
* implement validate_skip config option
* fix comments to end with period
* fix suites that used smtp notifier without a smtp container
* add docs
* add file notifier startup check
* move file mode into const.go
* disable gosec linting on insecureskipverify since it's intended, warned, and discouraged
* minor PR commentary adjustment
* apply suggestions from code review
Co-Authored-By: Amir Zarrinkafsh <nightah@me.com>
2020-04-21 04:59:38 +00:00
|
|
|
// MockNotifier is a mock of Notifier interface.
|
2019-04-24 21:52:08 +00:00
|
|
|
type MockNotifier struct {
|
|
|
|
ctrl *gomock.Controller
|
|
|
|
recorder *MockNotifierMockRecorder
|
|
|
|
}
|
|
|
|
|
[FEATURE] Notifier Startup Checks (#889)
* implement SMTP notifier startup check
* check dial, starttls, auth, mail from, rcpt to, reset, and quit
* log the error on failure
* implement mock
* misc optimizations, adjustments, and refactoring
* implement validate_skip config option
* fix comments to end with period
* fix suites that used smtp notifier without a smtp container
* add docs
* add file notifier startup check
* move file mode into const.go
* disable gosec linting on insecureskipverify since it's intended, warned, and discouraged
* minor PR commentary adjustment
* apply suggestions from code review
Co-Authored-By: Amir Zarrinkafsh <nightah@me.com>
2020-04-21 04:59:38 +00:00
|
|
|
// MockNotifierMockRecorder is the mock recorder for MockNotifier.
|
2019-04-24 21:52:08 +00:00
|
|
|
type MockNotifierMockRecorder struct {
|
|
|
|
mock *MockNotifier
|
|
|
|
}
|
|
|
|
|
[FEATURE] Notifier Startup Checks (#889)
* implement SMTP notifier startup check
* check dial, starttls, auth, mail from, rcpt to, reset, and quit
* log the error on failure
* implement mock
* misc optimizations, adjustments, and refactoring
* implement validate_skip config option
* fix comments to end with period
* fix suites that used smtp notifier without a smtp container
* add docs
* add file notifier startup check
* move file mode into const.go
* disable gosec linting on insecureskipverify since it's intended, warned, and discouraged
* minor PR commentary adjustment
* apply suggestions from code review
Co-Authored-By: Amir Zarrinkafsh <nightah@me.com>
2020-04-21 04:59:38 +00:00
|
|
|
// NewMockNotifier creates a new mock instance.
|
2019-04-24 21:52:08 +00:00
|
|
|
func NewMockNotifier(ctrl *gomock.Controller) *MockNotifier {
|
|
|
|
mock := &MockNotifier{ctrl: ctrl}
|
|
|
|
mock.recorder = &MockNotifierMockRecorder{mock}
|
|
|
|
return mock
|
|
|
|
}
|
|
|
|
|
[FEATURE] Notifier Startup Checks (#889)
* implement SMTP notifier startup check
* check dial, starttls, auth, mail from, rcpt to, reset, and quit
* log the error on failure
* implement mock
* misc optimizations, adjustments, and refactoring
* implement validate_skip config option
* fix comments to end with period
* fix suites that used smtp notifier without a smtp container
* add docs
* add file notifier startup check
* move file mode into const.go
* disable gosec linting on insecureskipverify since it's intended, warned, and discouraged
* minor PR commentary adjustment
* apply suggestions from code review
Co-Authored-By: Amir Zarrinkafsh <nightah@me.com>
2020-04-21 04:59:38 +00:00
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
2019-04-24 21:52:08 +00:00
|
|
|
func (m *MockNotifier) EXPECT() *MockNotifierMockRecorder {
|
|
|
|
return m.recorder
|
|
|
|
}
|
|
|
|
|
[FEATURE] Notifier Startup Checks (#889)
* implement SMTP notifier startup check
* check dial, starttls, auth, mail from, rcpt to, reset, and quit
* log the error on failure
* implement mock
* misc optimizations, adjustments, and refactoring
* implement validate_skip config option
* fix comments to end with period
* fix suites that used smtp notifier without a smtp container
* add docs
* add file notifier startup check
* move file mode into const.go
* disable gosec linting on insecureskipverify since it's intended, warned, and discouraged
* minor PR commentary adjustment
* apply suggestions from code review
Co-Authored-By: Amir Zarrinkafsh <nightah@me.com>
2020-04-21 04:59:38 +00:00
|
|
|
// Send mocks base method.
|
2022-12-23 05:06:49 +00:00
|
|
|
func (m *MockNotifier) Send(arg0 context.Context, arg1 mail.Address, arg2 string, arg3 *templates.EmailTemplate, arg4 interface{}) error {
|
2019-04-24 21:52:08 +00:00
|
|
|
m.ctrl.T.Helper()
|
2022-12-23 05:06:49 +00:00
|
|
|
ret := m.ctrl.Call(m, "Send", arg0, arg1, arg2, arg3, arg4)
|
2019-04-24 21:52:08 +00:00
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
[FEATURE] Notifier Startup Checks (#889)
* implement SMTP notifier startup check
* check dial, starttls, auth, mail from, rcpt to, reset, and quit
* log the error on failure
* implement mock
* misc optimizations, adjustments, and refactoring
* implement validate_skip config option
* fix comments to end with period
* fix suites that used smtp notifier without a smtp container
* add docs
* add file notifier startup check
* move file mode into const.go
* disable gosec linting on insecureskipverify since it's intended, warned, and discouraged
* minor PR commentary adjustment
* apply suggestions from code review
Co-Authored-By: Amir Zarrinkafsh <nightah@me.com>
2020-04-21 04:59:38 +00:00
|
|
|
// Send indicates an expected call of Send.
|
2022-12-23 05:06:49 +00:00
|
|
|
func (mr *MockNotifierMockRecorder) Send(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
|
2019-04-24 21:52:08 +00:00
|
|
|
mr.mock.ctrl.T.Helper()
|
2022-12-23 05:06:49 +00:00
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockNotifier)(nil).Send), arg0, arg1, arg2, arg3, arg4)
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|
2020-05-04 19:39:25 +00:00
|
|
|
|
|
|
|
// StartupCheck mocks base method.
|
2021-11-23 09:45:38 +00:00
|
|
|
func (m *MockNotifier) StartupCheck() error {
|
2020-05-04 19:39:25 +00:00
|
|
|
m.ctrl.T.Helper()
|
2021-11-23 09:45:38 +00:00
|
|
|
ret := m.ctrl.Call(m, "StartupCheck")
|
2021-09-17 09:53:59 +00:00
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
return ret0
|
2020-05-04 19:39:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StartupCheck indicates an expected call of StartupCheck.
|
2021-11-23 09:45:38 +00:00
|
|
|
func (mr *MockNotifierMockRecorder) StartupCheck() *gomock.Call {
|
2020-05-04 19:39:25 +00:00
|
|
|
mr.mock.ctrl.T.Helper()
|
2021-11-23 09:45:38 +00:00
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartupCheck", reflect.TypeOf((*MockNotifier)(nil).StartupCheck))
|
2020-05-04 19:39:25 +00:00
|
|
|
}
|