summaryrefslogtreecommitdiff
path: root/tests/mocks
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-16 17:12:37 +0300
committerValery Piashchynski <[email protected]>2021-09-16 17:12:37 +0300
commitf3491c089b4da77fd8d2bc942a88b6b8d117a8a5 (patch)
tree32bfffb1f24eeee7b909747cc00a6a6b9fd3ee83 /tests/mocks
parent5d2cd55ab522d4f1e65a833f91146444465a32ac (diff)
Move plugins to a separate repository
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/mock_log.go146
1 files changed, 0 insertions, 146 deletions
diff --git a/tests/mocks/mock_log.go b/tests/mocks/mock_log.go
deleted file mode 100644
index 696accc0..00000000
--- a/tests/mocks/mock_log.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package mocks
-
-import (
- reflect "reflect"
-
- gomock "github.com/golang/mock/gomock"
- logger "github.com/spiral/roadrunner/v2/plugins/logger"
-)
-
-// MockLogger is a mock of Logger interface.
-type MockLogger struct {
- ctrl *gomock.Controller
- recorder *MockLoggerMockRecorder
-}
-
-// MockLoggerMockRecorder is the mock recorder for MockLogger.
-type MockLoggerMockRecorder struct {
- mock *MockLogger
-}
-
-// NewMockLogger creates a new mock instance.
-func NewMockLogger(ctrl *gomock.Controller) *MockLogger {
- mock := &MockLogger{ctrl: ctrl}
- mock.recorder = &MockLoggerMockRecorder{mock}
- return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockLogger) EXPECT() *MockLoggerMockRecorder {
- return m.recorder
-}
-
-func (m *MockLogger) Init() error {
- mock := &MockLogger{ctrl: m.ctrl}
- mock.recorder = &MockLoggerMockRecorder{mock}
- return nil
-}
-
-// Debug mocks base method.
-func (m *MockLogger) Debug(msg string, keyvals ...interface{}) {
- m.ctrl.T.Helper()
- varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
- m.ctrl.Call(m, "Debug", varargs...)
-}
-
-// Debug indicates an expected call of Debug.
-func (mr *MockLoggerMockRecorder) Debug(msg interface{}, keyvals ...interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- varargs := append([]interface{}{msg}, keyvals...)
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockLogger)(nil).Debug), varargs...)
-}
-
-// Error mocks base method.
-func (m *MockLogger) Error(msg string, keyvals ...interface{}) {
- m.ctrl.T.Helper()
- varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
- m.ctrl.Call(m, "Error", varargs...)
-}
-
-// Error indicates an expected call of Error.
-func (mr *MockLoggerMockRecorder) Error(msg interface{}, keyvals ...interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- varargs := append([]interface{}{msg}, keyvals...)
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockLogger)(nil).Error), varargs...)
-}
-
-// Info mocks base method.
-func (m *MockLogger) Info(msg string, keyvals ...interface{}) {
- m.ctrl.T.Helper()
- varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
- m.ctrl.Call(m, "Info", varargs...)
-}
-
-// Info indicates an expected call of Info.
-func (mr *MockLoggerMockRecorder) Info(msg interface{}, keyvals ...interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- varargs := append([]interface{}{msg}, keyvals...)
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockLogger)(nil).Info), varargs...)
-}
-
-// Warn mocks base method.
-func (m *MockLogger) Warn(msg string, keyvals ...interface{}) {
- m.ctrl.T.Helper()
- varargs := []interface{}{msg}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
- m.ctrl.Call(m, "Warn", varargs...)
-}
-
-// Warn indicates an expected call of Warn.
-func (mr *MockLoggerMockRecorder) Warn(msg interface{}, keyvals ...interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- varargs := append([]interface{}{msg}, keyvals...)
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warn", reflect.TypeOf((*MockLogger)(nil).Warn), varargs...)
-}
-
-// MockWithLogger is a mock of WithLogger interface.
-type MockWithLogger struct {
- ctrl *gomock.Controller
- recorder *MockWithLoggerMockRecorder
-}
-
-// MockWithLoggerMockRecorder is the mock recorder for MockWithLogger.
-type MockWithLoggerMockRecorder struct {
- mock *MockWithLogger
-}
-
-// NewMockWithLogger creates a new mock instance.
-func NewMockWithLogger(ctrl *gomock.Controller) *MockWithLogger {
- mock := &MockWithLogger{ctrl: ctrl}
- mock.recorder = &MockWithLoggerMockRecorder{mock}
- return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockWithLogger) EXPECT() *MockWithLoggerMockRecorder {
- return m.recorder
-}
-
-// With mocks base method.
-func (m *MockWithLogger) With(keyvals ...interface{}) logger.Logger {
- m.ctrl.T.Helper()
- varargs := []interface{}{}
- for _, a := range keyvals {
- varargs = append(varargs, a)
- }
- ret := m.ctrl.Call(m, "With", varargs...)
- ret0, _ := ret[0].(logger.Logger)
- return ret0
-}
-
-// With indicates an expected call of With.
-func (mr *MockWithLoggerMockRecorder) With(keyvals ...interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockWithLogger)(nil).With), keyvals...)
-}