From 5503c8043f850ae5aafee0360f1df65f32450ff1 Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 21 Nov 2022 22:32:29 +0100 Subject: [PATCH] Regenerate code with service mocking support --- examples/mocking/mocks/dbfs.go | 283 --------------------------------- 1 file changed, 283 deletions(-) delete mode 100644 examples/mocking/mocks/dbfs.go diff --git a/examples/mocking/mocks/dbfs.go b/examples/mocking/mocks/dbfs.go deleted file mode 100644 index c4fdb23d1..000000000 --- a/examples/mocking/mocks/dbfs.go +++ /dev/null @@ -1,283 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: github.com/databricks/databricks-sdk-go/service/dbfs (interfaces: DbfsService) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - context "context" - io "io" - reflect "reflect" - - dbfs "github.com/databricks/databricks-sdk-go/service/dbfs" - gomock "github.com/golang/mock/gomock" -) - -// MockDbfsService is a mock of DbfsService interface. -type MockDbfsService struct { - ctrl *gomock.Controller - recorder *MockDbfsServiceMockRecorder -} - -// MockDbfsServiceMockRecorder is the mock recorder for MockDbfsService. -type MockDbfsServiceMockRecorder struct { - mock *MockDbfsService -} - -// NewMockDbfsService creates a new mock instance. -func NewMockDbfsService(ctrl *gomock.Controller) *MockDbfsService { - mock := &MockDbfsService{ctrl: ctrl} - mock.recorder = &MockDbfsServiceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDbfsService) EXPECT() *MockDbfsServiceMockRecorder { - return m.recorder -} - -// AddBlock mocks base method. -func (m *MockDbfsService) AddBlock(arg0 context.Context, arg1 dbfs.AddBlock) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddBlock", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// AddBlock indicates an expected call of AddBlock. -func (mr *MockDbfsServiceMockRecorder) AddBlock(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlock", reflect.TypeOf((*MockDbfsService)(nil).AddBlock), arg0, arg1) -} - -// Close mocks base method. -func (m *MockDbfsService) Close(arg0 context.Context, arg1 dbfs.Close) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockDbfsServiceMockRecorder) Close(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDbfsService)(nil).Close), arg0, arg1) -} - -// CloseByHandle mocks base method. -func (m *MockDbfsService) CloseByHandle(arg0 context.Context, arg1 int64) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloseByHandle", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// CloseByHandle indicates an expected call of CloseByHandle. -func (mr *MockDbfsServiceMockRecorder) CloseByHandle(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseByHandle", reflect.TypeOf((*MockDbfsService)(nil).CloseByHandle), arg0, arg1) -} - -// Create mocks base method. -func (m *MockDbfsService) Create(arg0 context.Context, arg1 dbfs.Create) (*dbfs.CreateResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) - ret0, _ := ret[0].(*dbfs.CreateResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Create indicates an expected call of Create. -func (mr *MockDbfsServiceMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDbfsService)(nil).Create), arg0, arg1) -} - -// Delete mocks base method. -func (m *MockDbfsService) Delete(arg0 context.Context, arg1 dbfs.Delete) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockDbfsServiceMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDbfsService)(nil).Delete), arg0, arg1) -} - -// GetStatus mocks base method. -func (m *MockDbfsService) GetStatus(arg0 context.Context, arg1 dbfs.GetStatusRequest) (*dbfs.FileInfo, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetStatus", arg0, arg1) - ret0, _ := ret[0].(*dbfs.FileInfo) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetStatus indicates an expected call of GetStatus. -func (mr *MockDbfsServiceMockRecorder) GetStatus(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStatus", reflect.TypeOf((*MockDbfsService)(nil).GetStatus), arg0, arg1) -} - -// GetStatusByPath mocks base method. -func (m *MockDbfsService) GetStatusByPath(arg0 context.Context, arg1 string) (*dbfs.FileInfo, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetStatusByPath", arg0, arg1) - ret0, _ := ret[0].(*dbfs.FileInfo) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetStatusByPath indicates an expected call of GetStatusByPath. -func (mr *MockDbfsServiceMockRecorder) GetStatusByPath(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStatusByPath", reflect.TypeOf((*MockDbfsService)(nil).GetStatusByPath), arg0, arg1) -} - -// List mocks base method. -func (m *MockDbfsService) List(arg0 context.Context, arg1 dbfs.ListRequest) (*dbfs.ListStatusResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) - ret0, _ := ret[0].(*dbfs.ListStatusResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// List indicates an expected call of List. -func (mr *MockDbfsServiceMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDbfsService)(nil).List), arg0, arg1) -} - -// ListAll mocks base method. -func (m *MockDbfsService) ListAll(arg0 context.Context, arg1 dbfs.ListRequest) ([]dbfs.FileInfo, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListAll", arg0, arg1) - ret0, _ := ret[0].([]dbfs.FileInfo) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListAll indicates an expected call of ListAll. -func (mr *MockDbfsServiceMockRecorder) ListAll(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAll", reflect.TypeOf((*MockDbfsService)(nil).ListAll), arg0, arg1) -} - -// ListByPath mocks base method. -func (m *MockDbfsService) ListByPath(arg0 context.Context, arg1 string) (*dbfs.ListStatusResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListByPath", arg0, arg1) - ret0, _ := ret[0].(*dbfs.ListStatusResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListByPath indicates an expected call of ListByPath. -func (mr *MockDbfsServiceMockRecorder) ListByPath(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByPath", reflect.TypeOf((*MockDbfsService)(nil).ListByPath), arg0, arg1) -} - -// Mkdirs mocks base method. -func (m *MockDbfsService) Mkdirs(arg0 context.Context, arg1 dbfs.MkDirs) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Mkdirs", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Mkdirs indicates an expected call of Mkdirs. -func (mr *MockDbfsServiceMockRecorder) Mkdirs(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Mkdirs", reflect.TypeOf((*MockDbfsService)(nil).Mkdirs), arg0, arg1) -} - -// MkdirsByPath mocks base method. -func (m *MockDbfsService) MkdirsByPath(arg0 context.Context, arg1 string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MkdirsByPath", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// MkdirsByPath indicates an expected call of MkdirsByPath. -func (mr *MockDbfsServiceMockRecorder) MkdirsByPath(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MkdirsByPath", reflect.TypeOf((*MockDbfsService)(nil).MkdirsByPath), arg0, arg1) -} - -// Move mocks base method. -func (m *MockDbfsService) Move(arg0 context.Context, arg1 dbfs.Move) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Move", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Move indicates an expected call of Move. -func (mr *MockDbfsServiceMockRecorder) Move(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Move", reflect.TypeOf((*MockDbfsService)(nil).Move), arg0, arg1) -} - -// Open mocks base method. -func (m *MockDbfsService) Open(arg0 context.Context, arg1 string) (*dbfs.FileReader, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Open", arg0, arg1) - ret0, _ := ret[0].(*dbfs.FileReader) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Open indicates an expected call of Open. -func (mr *MockDbfsServiceMockRecorder) Open(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockDbfsService)(nil).Open), arg0, arg1) -} - -// Overwrite mocks base method. -func (m *MockDbfsService) Overwrite(arg0 context.Context, arg1 string, arg2 io.Reader) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Overwrite", arg0, arg1, arg2) - ret0, _ := ret[0].(error) - return ret0 -} - -// Overwrite indicates an expected call of Overwrite. -func (mr *MockDbfsServiceMockRecorder) Overwrite(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Overwrite", reflect.TypeOf((*MockDbfsService)(nil).Overwrite), arg0, arg1, arg2) -} - -// Put mocks base method. -func (m *MockDbfsService) Put(arg0 context.Context, arg1 dbfs.Put) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Put", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Put indicates an expected call of Put. -func (mr *MockDbfsServiceMockRecorder) Put(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockDbfsService)(nil).Put), arg0, arg1) -} - -// Read mocks base method. -func (m *MockDbfsService) Read(arg0 context.Context, arg1 dbfs.ReadRequest) (*dbfs.ReadResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Read", arg0, arg1) - ret0, _ := ret[0].(*dbfs.ReadResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Read indicates an expected call of Read. -func (mr *MockDbfsServiceMockRecorder) Read(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockDbfsService)(nil).Read), arg0, arg1) -}