Merged in feature/import (pull request #157)
Feature/import * importstart * pp * tests * importtests * 100GB * lint * passtests * utc * awsprofile * doublequotes * host
This commit is contained in:
@@ -1961,6 +1961,82 @@ func (_c *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call) RunAndR
|
||||
return _c
|
||||
}
|
||||
|
||||
// UploadDocumentWithBodyWithResponse provides a mock function with given fields: ctx, id, contentType, body, reqEditors
|
||||
func (_m *MockClientWithResponsesInterface) UploadDocumentWithBodyWithResponse(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UploadDocumentResponse, error) {
|
||||
_va := make([]interface{}, len(reqEditors))
|
||||
for _i := range reqEditors {
|
||||
_va[_i] = reqEditors[_i]
|
||||
}
|
||||
var _ca []interface{}
|
||||
_ca = append(_ca, ctx, id, contentType, body)
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UploadDocumentWithBodyWithResponse")
|
||||
}
|
||||
|
||||
var r0 *queryapi.UploadDocumentResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UploadDocumentResponse, error)); ok {
|
||||
return rf(ctx, id, contentType, body, reqEditors...)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.UploadDocumentResponse); ok {
|
||||
r0 = rf(ctx, id, contentType, body, reqEditors...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*queryapi.UploadDocumentResponse)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
|
||||
r1 = rf(ctx, id, contentType, body, reqEditors...)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadDocumentWithBodyWithResponse'
|
||||
type MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// UploadDocumentWithBodyWithResponse is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - id queryapi.ClientID
|
||||
// - contentType string
|
||||
// - body io.Reader
|
||||
// - reqEditors ...queryapi.RequestEditorFn
|
||||
func (_e *MockClientWithResponsesInterface_Expecter) UploadDocumentWithBodyWithResponse(ctx interface{}, id interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call {
|
||||
return &MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call{Call: _e.mock.On("UploadDocumentWithBodyWithResponse",
|
||||
append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)}
|
||||
}
|
||||
|
||||
func (_c *MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4)
|
||||
for i, a := range args[4:] {
|
||||
if a != nil {
|
||||
variadicArgs[i] = a.(queryapi.RequestEditorFn)
|
||||
}
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call) Return(_a0 *queryapi.UploadDocumentResponse, _a1 error) *MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UploadDocumentResponse, error)) *MockClientWithResponsesInterface_UploadDocumentWithBodyWithResponse_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// NewMockClientWithResponsesInterface creates a new instance of MockClientWithResponsesInterface. 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 NewMockClientWithResponsesInterface(t interface {
|
||||
|
||||
Reference in New Issue
Block a user