mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
go.mod still declared `module github.com/hanzoai/deploy` after the repo was renamed. A Go module path is not cosmetic — it is the resolvable location. So `go get github.com/hanzoai/cd` could not work, and anything importing this module had to spell a name that no longer exists at that address. The build log of v3.6.0 is where it surfaced: the compiler was still emitting github.com/hanzoai/deploy/cmd/cd/commands. 3541 import paths across 690 .go, 19 .proto, 4 .yaml, 3 .sh, 2 .mod, Procfile and Makefile. Plus the 62 ghcr.io/hanzoai/deploy image references, moved to ghcr.io/hanzoai/cd to match hanzo.yml's build target — a distinct string from the module path, replaced separately so neither could clobber the other. go mod tidy clean, CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./... clean. Co-authored-by: Hanzo Dev <[email protected]>
1644 lines
45 KiB
Go
Generated
1644 lines
45 KiB
Go
Generated
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzoai/cd/util/git"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewClient creates a new instance of Client. 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 NewClient(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Client {
|
|
mock := &Client{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Client is an autogenerated mock type for the Client type
|
|
type Client struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Client_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Client) EXPECT() *Client_Expecter {
|
|
return &Client_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddAndPushNote provides a mock function for the type Client
|
|
func (_mock *Client) AddAndPushNote(ctx context.Context, sha string, namespace string, note string) error {
|
|
ret := _mock.Called(ctx, sha, namespace, note)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddAndPushNote")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
|
|
r0 = returnFunc(ctx, sha, namespace, note)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_AddAndPushNote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAndPushNote'
|
|
type Client_AddAndPushNote_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddAndPushNote is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - sha string
|
|
// - namespace string
|
|
// - note string
|
|
func (_e *Client_Expecter) AddAndPushNote(ctx any, sha any, namespace any, note any) *Client_AddAndPushNote_Call {
|
|
return &Client_AddAndPushNote_Call{Call: _e.mock.On("AddAndPushNote", ctx, sha, namespace, note)}
|
|
}
|
|
|
|
func (_c *Client_AddAndPushNote_Call) Run(run func(ctx context.Context, sha string, namespace string, note string)) *Client_AddAndPushNote_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
var arg3 string
|
|
if args[3] != nil {
|
|
arg3 = args[3].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_AddAndPushNote_Call) Return(err error) *Client_AddAndPushNote_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_AddAndPushNote_Call) RunAndReturn(run func(ctx context.Context, sha string, namespace string, note string) error) *Client_AddAndPushNote_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ChangedFiles provides a mock function for the type Client
|
|
func (_mock *Client) ChangedFiles(ctx context.Context, revision string, targetRevision string) ([]string, error) {
|
|
ret := _mock.Called(ctx, revision, targetRevision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ChangedFiles")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]string, error)); ok {
|
|
return returnFunc(ctx, revision, targetRevision)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []string); ok {
|
|
r0 = returnFunc(ctx, revision, targetRevision)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, revision, targetRevision)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_ChangedFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangedFiles'
|
|
type Client_ChangedFiles_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ChangedFiles is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
// - targetRevision string
|
|
func (_e *Client_Expecter) ChangedFiles(ctx any, revision any, targetRevision any) *Client_ChangedFiles_Call {
|
|
return &Client_ChangedFiles_Call{Call: _e.mock.On("ChangedFiles", ctx, revision, targetRevision)}
|
|
}
|
|
|
|
func (_c *Client_ChangedFiles_Call) Run(run func(ctx context.Context, revision string, targetRevision string)) *Client_ChangedFiles_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_ChangedFiles_Call) Return(strings []string, err error) *Client_ChangedFiles_Call {
|
|
_c.Call.Return(strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_ChangedFiles_Call) RunAndReturn(run func(ctx context.Context, revision string, targetRevision string) ([]string, error)) *Client_ChangedFiles_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Checkout provides a mock function for the type Client
|
|
func (_mock *Client) Checkout(ctx context.Context, revision string, submoduleEnabled bool, cleanState bool) (string, error) {
|
|
ret := _mock.Called(ctx, revision, submoduleEnabled, cleanState)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Checkout")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool, bool) (string, error)); ok {
|
|
return returnFunc(ctx, revision, submoduleEnabled, cleanState)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool, bool) string); ok {
|
|
r0 = returnFunc(ctx, revision, submoduleEnabled, cleanState)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool, bool) error); ok {
|
|
r1 = returnFunc(ctx, revision, submoduleEnabled, cleanState)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_Checkout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Checkout'
|
|
type Client_Checkout_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Checkout is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
// - submoduleEnabled bool
|
|
// - cleanState bool
|
|
func (_e *Client_Expecter) Checkout(ctx any, revision any, submoduleEnabled any, cleanState any) *Client_Checkout_Call {
|
|
return &Client_Checkout_Call{Call: _e.mock.On("Checkout", ctx, revision, submoduleEnabled, cleanState)}
|
|
}
|
|
|
|
func (_c *Client_Checkout_Call) Run(run func(ctx context.Context, revision string, submoduleEnabled bool, cleanState bool)) *Client_Checkout_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 bool
|
|
if args[2] != nil {
|
|
arg2 = args[2].(bool)
|
|
}
|
|
var arg3 bool
|
|
if args[3] != nil {
|
|
arg3 = args[3].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Checkout_Call) Return(s string, err error) *Client_Checkout_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Checkout_Call) RunAndReturn(run func(ctx context.Context, revision string, submoduleEnabled bool, cleanState bool) (string, error)) *Client_Checkout_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckoutOrNew provides a mock function for the type Client
|
|
func (_mock *Client) CheckoutOrNew(ctx context.Context, branch string, base string, submoduleEnabled bool) (string, error) {
|
|
ret := _mock.Called(ctx, branch, base, submoduleEnabled)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckoutOrNew")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool) (string, error)); ok {
|
|
return returnFunc(ctx, branch, base, submoduleEnabled)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool) string); ok {
|
|
r0 = returnFunc(ctx, branch, base, submoduleEnabled)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, bool) error); ok {
|
|
r1 = returnFunc(ctx, branch, base, submoduleEnabled)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_CheckoutOrNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckoutOrNew'
|
|
type Client_CheckoutOrNew_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckoutOrNew is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - branch string
|
|
// - base string
|
|
// - submoduleEnabled bool
|
|
func (_e *Client_Expecter) CheckoutOrNew(ctx any, branch any, base any, submoduleEnabled any) *Client_CheckoutOrNew_Call {
|
|
return &Client_CheckoutOrNew_Call{Call: _e.mock.On("CheckoutOrNew", ctx, branch, base, submoduleEnabled)}
|
|
}
|
|
|
|
func (_c *Client_CheckoutOrNew_Call) Run(run func(ctx context.Context, branch string, base string, submoduleEnabled bool)) *Client_CheckoutOrNew_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
var arg3 bool
|
|
if args[3] != nil {
|
|
arg3 = args[3].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CheckoutOrNew_Call) Return(s string, err error) *Client_CheckoutOrNew_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CheckoutOrNew_Call) RunAndReturn(run func(ctx context.Context, branch string, base string, submoduleEnabled bool) (string, error)) *Client_CheckoutOrNew_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CheckoutOrOrphan provides a mock function for the type Client
|
|
func (_mock *Client) CheckoutOrOrphan(ctx context.Context, branch string, submoduleEnabled bool) (string, error) {
|
|
ret := _mock.Called(ctx, branch, submoduleEnabled)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckoutOrOrphan")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) (string, error)); ok {
|
|
return returnFunc(ctx, branch, submoduleEnabled)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) string); ok {
|
|
r0 = returnFunc(ctx, branch, submoduleEnabled)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
|
|
r1 = returnFunc(ctx, branch, submoduleEnabled)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_CheckoutOrOrphan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckoutOrOrphan'
|
|
type Client_CheckoutOrOrphan_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CheckoutOrOrphan is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - branch string
|
|
// - submoduleEnabled bool
|
|
func (_e *Client_Expecter) CheckoutOrOrphan(ctx any, branch any, submoduleEnabled any) *Client_CheckoutOrOrphan_Call {
|
|
return &Client_CheckoutOrOrphan_Call{Call: _e.mock.On("CheckoutOrOrphan", ctx, branch, submoduleEnabled)}
|
|
}
|
|
|
|
func (_c *Client_CheckoutOrOrphan_Call) Run(run func(ctx context.Context, branch string, submoduleEnabled bool)) *Client_CheckoutOrOrphan_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 bool
|
|
if args[2] != nil {
|
|
arg2 = args[2].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CheckoutOrOrphan_Call) Return(s string, err error) *Client_CheckoutOrOrphan_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CheckoutOrOrphan_Call) RunAndReturn(run func(ctx context.Context, branch string, submoduleEnabled bool) (string, error)) *Client_CheckoutOrOrphan_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CommitAndPush provides a mock function for the type Client
|
|
func (_mock *Client) CommitAndPush(ctx context.Context, branch string, message string) (string, error) {
|
|
ret := _mock.Called(ctx, branch, message)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CommitAndPush")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
|
|
return returnFunc(ctx, branch, message)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
|
|
r0 = returnFunc(ctx, branch, message)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, branch, message)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_CommitAndPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitAndPush'
|
|
type Client_CommitAndPush_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CommitAndPush is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - branch string
|
|
// - message string
|
|
func (_e *Client_Expecter) CommitAndPush(ctx any, branch any, message any) *Client_CommitAndPush_Call {
|
|
return &Client_CommitAndPush_Call{Call: _e.mock.On("CommitAndPush", ctx, branch, message)}
|
|
}
|
|
|
|
func (_c *Client_CommitAndPush_Call) Run(run func(ctx context.Context, branch string, message string)) *Client_CommitAndPush_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CommitAndPush_Call) Return(s string, err error) *Client_CommitAndPush_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CommitAndPush_Call) RunAndReturn(run func(ctx context.Context, branch string, message string) (string, error)) *Client_CommitAndPush_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CommitSHA provides a mock function for the type Client
|
|
func (_mock *Client) CommitSHA(ctx context.Context) (string, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CommitSHA")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_CommitSHA_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitSHA'
|
|
type Client_CommitSHA_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CommitSHA is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Client_Expecter) CommitSHA(ctx any) *Client_CommitSHA_Call {
|
|
return &Client_CommitSHA_Call{Call: _e.mock.On("CommitSHA", ctx)}
|
|
}
|
|
|
|
func (_c *Client_CommitSHA_Call) Run(run func(ctx context.Context)) *Client_CommitSHA_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CommitSHA_Call) Return(s string, err error) *Client_CommitSHA_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_CommitSHA_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *Client_CommitSHA_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Fetch provides a mock function for the type Client
|
|
func (_mock *Client) Fetch(ctx context.Context, revision string, depth int64) error {
|
|
ret := _mock.Called(ctx, revision, depth)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Fetch")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
|
|
r0 = returnFunc(ctx, revision, depth)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_Fetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fetch'
|
|
type Client_Fetch_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Fetch is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
// - depth int64
|
|
func (_e *Client_Expecter) Fetch(ctx any, revision any, depth any) *Client_Fetch_Call {
|
|
return &Client_Fetch_Call{Call: _e.mock.On("Fetch", ctx, revision, depth)}
|
|
}
|
|
|
|
func (_c *Client_Fetch_Call) Run(run func(ctx context.Context, revision string, depth int64)) *Client_Fetch_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 int64
|
|
if args[2] != nil {
|
|
arg2 = args[2].(int64)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Fetch_Call) Return(err error) *Client_Fetch_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Fetch_Call) RunAndReturn(run func(ctx context.Context, revision string, depth int64) error) *Client_Fetch_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetCommitNote provides a mock function for the type Client
|
|
func (_mock *Client) GetCommitNote(ctx context.Context, sha string, namespace string) (string, error) {
|
|
ret := _mock.Called(ctx, sha, namespace)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCommitNote")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
|
|
return returnFunc(ctx, sha, namespace)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
|
|
r0 = returnFunc(ctx, sha, namespace)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, sha, namespace)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_GetCommitNote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommitNote'
|
|
type Client_GetCommitNote_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCommitNote is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - sha string
|
|
// - namespace string
|
|
func (_e *Client_Expecter) GetCommitNote(ctx any, sha any, namespace any) *Client_GetCommitNote_Call {
|
|
return &Client_GetCommitNote_Call{Call: _e.mock.On("GetCommitNote", ctx, sha, namespace)}
|
|
}
|
|
|
|
func (_c *Client_GetCommitNote_Call) Run(run func(ctx context.Context, sha string, namespace string)) *Client_GetCommitNote_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_GetCommitNote_Call) Return(s string, err error) *Client_GetCommitNote_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_GetCommitNote_Call) RunAndReturn(run func(ctx context.Context, sha string, namespace string) (string, error)) *Client_GetCommitNote_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// HasFileChanged provides a mock function for the type Client
|
|
func (_mock *Client) HasFileChanged(ctx context.Context, filePath string) (bool, error) {
|
|
ret := _mock.Called(ctx, filePath)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for HasFileChanged")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
|
|
return returnFunc(ctx, filePath)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
|
r0 = returnFunc(ctx, filePath)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, filePath)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_HasFileChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasFileChanged'
|
|
type Client_HasFileChanged_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// HasFileChanged is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - filePath string
|
|
func (_e *Client_Expecter) HasFileChanged(ctx any, filePath any) *Client_HasFileChanged_Call {
|
|
return &Client_HasFileChanged_Call{Call: _e.mock.On("HasFileChanged", ctx, filePath)}
|
|
}
|
|
|
|
func (_c *Client_HasFileChanged_Call) Run(run func(ctx context.Context, filePath string)) *Client_HasFileChanged_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_HasFileChanged_Call) Return(b bool, err error) *Client_HasFileChanged_Call {
|
|
_c.Call.Return(b, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_HasFileChanged_Call) RunAndReturn(run func(ctx context.Context, filePath string) (bool, error)) *Client_HasFileChanged_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Init provides a mock function for the type Client
|
|
func (_mock *Client) Init() error {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Init")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func() error); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
|
|
type Client_Init_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Init is a helper method to define mock.On call
|
|
func (_e *Client_Expecter) Init() *Client_Init_Call {
|
|
return &Client_Init_Call{Call: _e.mock.On("Init")}
|
|
}
|
|
|
|
func (_c *Client_Init_Call) Run(run func()) *Client_Init_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Init_Call) Return(err error) *Client_Init_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Init_Call) RunAndReturn(run func() error) *Client_Init_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IsAnnotatedTag provides a mock function for the type Client
|
|
func (_mock *Client) IsAnnotatedTag(ctx context.Context, revision string) bool {
|
|
ret := _mock.Called(ctx, revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsAnnotatedTag")
|
|
}
|
|
|
|
var r0 bool
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
|
r0 = returnFunc(ctx, revision)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_IsAnnotatedTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAnnotatedTag'
|
|
type Client_IsAnnotatedTag_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IsAnnotatedTag is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
func (_e *Client_Expecter) IsAnnotatedTag(ctx any, revision any) *Client_IsAnnotatedTag_Call {
|
|
return &Client_IsAnnotatedTag_Call{Call: _e.mock.On("IsAnnotatedTag", ctx, revision)}
|
|
}
|
|
|
|
func (_c *Client_IsAnnotatedTag_Call) Run(run func(ctx context.Context, revision string)) *Client_IsAnnotatedTag_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_IsAnnotatedTag_Call) Return(b bool) *Client_IsAnnotatedTag_Call {
|
|
_c.Call.Return(b)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_IsAnnotatedTag_Call) RunAndReturn(run func(ctx context.Context, revision string) bool) *Client_IsAnnotatedTag_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IsRevisionPresent provides a mock function for the type Client
|
|
func (_mock *Client) IsRevisionPresent(ctx context.Context, revision string) bool {
|
|
ret := _mock.Called(ctx, revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsRevisionPresent")
|
|
}
|
|
|
|
var r0 bool
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
|
r0 = returnFunc(ctx, revision)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_IsRevisionPresent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRevisionPresent'
|
|
type Client_IsRevisionPresent_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IsRevisionPresent is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
func (_e *Client_Expecter) IsRevisionPresent(ctx any, revision any) *Client_IsRevisionPresent_Call {
|
|
return &Client_IsRevisionPresent_Call{Call: _e.mock.On("IsRevisionPresent", ctx, revision)}
|
|
}
|
|
|
|
func (_c *Client_IsRevisionPresent_Call) Run(run func(ctx context.Context, revision string)) *Client_IsRevisionPresent_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_IsRevisionPresent_Call) Return(b bool) *Client_IsRevisionPresent_Call {
|
|
_c.Call.Return(b)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_IsRevisionPresent_Call) RunAndReturn(run func(ctx context.Context, revision string) bool) *Client_IsRevisionPresent_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LsFiles provides a mock function for the type Client
|
|
func (_mock *Client) LsFiles(ctx context.Context, path string, enableNewGitFileGlobbing bool) ([]string, error) {
|
|
ret := _mock.Called(ctx, path, enableNewGitFileGlobbing)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsFiles")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) ([]string, error)); ok {
|
|
return returnFunc(ctx, path, enableNewGitFileGlobbing)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) []string); ok {
|
|
r0 = returnFunc(ctx, path, enableNewGitFileGlobbing)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
|
|
r1 = returnFunc(ctx, path, enableNewGitFileGlobbing)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_LsFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsFiles'
|
|
type Client_LsFiles_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LsFiles is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - path string
|
|
// - enableNewGitFileGlobbing bool
|
|
func (_e *Client_Expecter) LsFiles(ctx any, path any, enableNewGitFileGlobbing any) *Client_LsFiles_Call {
|
|
return &Client_LsFiles_Call{Call: _e.mock.On("LsFiles", ctx, path, enableNewGitFileGlobbing)}
|
|
}
|
|
|
|
func (_c *Client_LsFiles_Call) Run(run func(ctx context.Context, path string, enableNewGitFileGlobbing bool)) *Client_LsFiles_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 bool
|
|
if args[2] != nil {
|
|
arg2 = args[2].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsFiles_Call) Return(strings []string, err error) *Client_LsFiles_Call {
|
|
_c.Call.Return(strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsFiles_Call) RunAndReturn(run func(ctx context.Context, path string, enableNewGitFileGlobbing bool) ([]string, error)) *Client_LsFiles_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LsLargeFiles provides a mock function for the type Client
|
|
func (_mock *Client) LsLargeFiles(ctx context.Context) ([]string, error) {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsLargeFiles")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
|
|
return returnFunc(ctx)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = returnFunc(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_LsLargeFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsLargeFiles'
|
|
type Client_LsLargeFiles_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LsLargeFiles is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Client_Expecter) LsLargeFiles(ctx any) *Client_LsLargeFiles_Call {
|
|
return &Client_LsLargeFiles_Call{Call: _e.mock.On("LsLargeFiles", ctx)}
|
|
}
|
|
|
|
func (_c *Client_LsLargeFiles_Call) Run(run func(ctx context.Context)) *Client_LsLargeFiles_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsLargeFiles_Call) Return(strings []string, err error) *Client_LsLargeFiles_Call {
|
|
_c.Call.Return(strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsLargeFiles_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *Client_LsLargeFiles_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LsRefs provides a mock function for the type Client
|
|
func (_mock *Client) LsRefs() (*git.Refs, error) {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsRefs")
|
|
}
|
|
|
|
var r0 *git.Refs
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func() (*git.Refs, error)); ok {
|
|
return returnFunc()
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func() *git.Refs); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*git.Refs)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func() error); ok {
|
|
r1 = returnFunc()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_LsRefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsRefs'
|
|
type Client_LsRefs_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LsRefs is a helper method to define mock.On call
|
|
func (_e *Client_Expecter) LsRefs() *Client_LsRefs_Call {
|
|
return &Client_LsRefs_Call{Call: _e.mock.On("LsRefs")}
|
|
}
|
|
|
|
func (_c *Client_LsRefs_Call) Run(run func()) *Client_LsRefs_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsRefs_Call) Return(refs *git.Refs, err error) *Client_LsRefs_Call {
|
|
_c.Call.Return(refs, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsRefs_Call) RunAndReturn(run func() (*git.Refs, error)) *Client_LsRefs_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LsRemote provides a mock function for the type Client
|
|
func (_mock *Client) LsRemote(revision string) (string, error) {
|
|
ret := _mock.Called(revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsRemote")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok {
|
|
return returnFunc(revision)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(string) string); ok {
|
|
r0 = returnFunc(revision)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = returnFunc(revision)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_LsRemote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsRemote'
|
|
type Client_LsRemote_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LsRemote is a helper method to define mock.On call
|
|
// - revision string
|
|
func (_e *Client_Expecter) LsRemote(revision any) *Client_LsRemote_Call {
|
|
return &Client_LsRemote_Call{Call: _e.mock.On("LsRemote", revision)}
|
|
}
|
|
|
|
func (_c *Client_LsRemote_Call) Run(run func(revision string)) *Client_LsRemote_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 string
|
|
if args[0] != nil {
|
|
arg0 = args[0].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsRemote_Call) Return(s string, err error) *Client_LsRemote_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsRemote_Call) RunAndReturn(run func(revision string) (string, error)) *Client_LsRemote_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// LsSignatures provides a mock function for the type Client
|
|
func (_mock *Client) LsSignatures(ctx context.Context, revision string, deep bool) ([]git.RevisionSignatureInfo, string, error) {
|
|
ret := _mock.Called(ctx, revision, deep)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsSignatures")
|
|
}
|
|
|
|
var r0 []git.RevisionSignatureInfo
|
|
var r1 string
|
|
var r2 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) ([]git.RevisionSignatureInfo, string, error)); ok {
|
|
return returnFunc(ctx, revision, deep)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) []git.RevisionSignatureInfo); ok {
|
|
r0 = returnFunc(ctx, revision, deep)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]git.RevisionSignatureInfo)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) string); ok {
|
|
r1 = returnFunc(ctx, revision, deep)
|
|
} else {
|
|
r1 = ret.Get(1).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(2).(func(context.Context, string, bool) error); ok {
|
|
r2 = returnFunc(ctx, revision, deep)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// Client_LsSignatures_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LsSignatures'
|
|
type Client_LsSignatures_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// LsSignatures is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
// - deep bool
|
|
func (_e *Client_Expecter) LsSignatures(ctx any, revision any, deep any) *Client_LsSignatures_Call {
|
|
return &Client_LsSignatures_Call{Call: _e.mock.On("LsSignatures", ctx, revision, deep)}
|
|
}
|
|
|
|
func (_c *Client_LsSignatures_Call) Run(run func(ctx context.Context, revision string, deep bool)) *Client_LsSignatures_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 bool
|
|
if args[2] != nil {
|
|
arg2 = args[2].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsSignatures_Call) Return(revisionSignatureInfos []git.RevisionSignatureInfo, s string, err error) *Client_LsSignatures_Call {
|
|
_c.Call.Return(revisionSignatureInfos, s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_LsSignatures_Call) RunAndReturn(run func(ctx context.Context, revision string, deep bool) ([]git.RevisionSignatureInfo, string, error)) *Client_LsSignatures_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveContents provides a mock function for the type Client
|
|
func (_mock *Client) RemoveContents(ctx context.Context, paths []string) (string, error) {
|
|
ret := _mock.Called(ctx, paths)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveContents")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, []string) (string, error)); ok {
|
|
return returnFunc(ctx, paths)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, []string) string); ok {
|
|
r0 = returnFunc(ctx, paths)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, []string) error); ok {
|
|
r1 = returnFunc(ctx, paths)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_RemoveContents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveContents'
|
|
type Client_RemoveContents_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveContents is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - paths []string
|
|
func (_e *Client_Expecter) RemoveContents(ctx any, paths any) *Client_RemoveContents_Call {
|
|
return &Client_RemoveContents_Call{Call: _e.mock.On("RemoveContents", ctx, paths)}
|
|
}
|
|
|
|
func (_c *Client_RemoveContents_Call) Run(run func(ctx context.Context, paths []string)) *Client_RemoveContents_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 []string
|
|
if args[1] != nil {
|
|
arg1 = args[1].([]string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_RemoveContents_Call) Return(s string, err error) *Client_RemoveContents_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_RemoveContents_Call) RunAndReturn(run func(ctx context.Context, paths []string) (string, error)) *Client_RemoveContents_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RepoURL provides a mock function for the type Client
|
|
func (_mock *Client) RepoURL() string {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RepoURL")
|
|
}
|
|
|
|
var r0 string
|
|
if returnFunc, ok := ret.Get(0).(func() string); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_RepoURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepoURL'
|
|
type Client_RepoURL_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RepoURL is a helper method to define mock.On call
|
|
func (_e *Client_Expecter) RepoURL() *Client_RepoURL_Call {
|
|
return &Client_RepoURL_Call{Call: _e.mock.On("RepoURL")}
|
|
}
|
|
|
|
func (_c *Client_RepoURL_Call) Run(run func()) *Client_RepoURL_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_RepoURL_Call) Return(s string) *Client_RepoURL_Call {
|
|
_c.Call.Return(s)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_RepoURL_Call) RunAndReturn(run func() string) *Client_RepoURL_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RevisionMetadata provides a mock function for the type Client
|
|
func (_mock *Client) RevisionMetadata(ctx context.Context, revision string) (*git.RevisionMetadata, error) {
|
|
ret := _mock.Called(ctx, revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RevisionMetadata")
|
|
}
|
|
|
|
var r0 *git.RevisionMetadata
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*git.RevisionMetadata, error)); ok {
|
|
return returnFunc(ctx, revision)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) *git.RevisionMetadata); ok {
|
|
r0 = returnFunc(ctx, revision)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*git.RevisionMetadata)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, revision)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_RevisionMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevisionMetadata'
|
|
type Client_RevisionMetadata_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RevisionMetadata is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
func (_e *Client_Expecter) RevisionMetadata(ctx any, revision any) *Client_RevisionMetadata_Call {
|
|
return &Client_RevisionMetadata_Call{Call: _e.mock.On("RevisionMetadata", ctx, revision)}
|
|
}
|
|
|
|
func (_c *Client_RevisionMetadata_Call) Run(run func(ctx context.Context, revision string)) *Client_RevisionMetadata_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_RevisionMetadata_Call) Return(revisionMetadata *git.RevisionMetadata, err error) *Client_RevisionMetadata_Call {
|
|
_c.Call.Return(revisionMetadata, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_RevisionMetadata_Call) RunAndReturn(run func(ctx context.Context, revision string) (*git.RevisionMetadata, error)) *Client_RevisionMetadata_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Root provides a mock function for the type Client
|
|
func (_mock *Client) Root() string {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Root")
|
|
}
|
|
|
|
var r0 string
|
|
if returnFunc, ok := ret.Get(0).(func() string); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_Root_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Root'
|
|
type Client_Root_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Root is a helper method to define mock.On call
|
|
func (_e *Client_Expecter) Root() *Client_Root_Call {
|
|
return &Client_Root_Call{Call: _e.mock.On("Root")}
|
|
}
|
|
|
|
func (_c *Client_Root_Call) Run(run func()) *Client_Root_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Root_Call) Return(s string) *Client_Root_Call {
|
|
_c.Call.Return(s)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Root_Call) RunAndReturn(run func() string) *Client_Root_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetAuthor provides a mock function for the type Client
|
|
func (_mock *Client) SetAuthor(ctx context.Context, name string, email string) (string, error) {
|
|
ret := _mock.Called(ctx, name, email)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetAuthor")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
|
|
return returnFunc(ctx, name, email)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
|
|
r0 = returnFunc(ctx, name, email)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, name, email)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_SetAuthor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAuthor'
|
|
type Client_SetAuthor_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetAuthor is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
// - email string
|
|
func (_e *Client_Expecter) SetAuthor(ctx any, name any, email any) *Client_SetAuthor_Call {
|
|
return &Client_SetAuthor_Call{Call: _e.mock.On("SetAuthor", ctx, name, email)}
|
|
}
|
|
|
|
func (_c *Client_SetAuthor_Call) Run(run func(ctx context.Context, name string, email string)) *Client_SetAuthor_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_SetAuthor_Call) Return(s string, err error) *Client_SetAuthor_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_SetAuthor_Call) RunAndReturn(run func(ctx context.Context, name string, email string) (string, error)) *Client_SetAuthor_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Submodule provides a mock function for the type Client
|
|
func (_mock *Client) Submodule(ctx context.Context) error {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Submodule")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Client_Submodule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Submodule'
|
|
type Client_Submodule_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Submodule is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *Client_Expecter) Submodule(ctx any) *Client_Submodule_Call {
|
|
return &Client_Submodule_Call{Call: _e.mock.On("Submodule", ctx)}
|
|
}
|
|
|
|
func (_c *Client_Submodule_Call) Run(run func(ctx context.Context)) *Client_Submodule_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Submodule_Call) Return(err error) *Client_Submodule_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_Submodule_Call) RunAndReturn(run func(ctx context.Context) error) *Client_Submodule_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// VerifyCommitSignature provides a mock function for the type Client
|
|
func (_mock *Client) VerifyCommitSignature(ctx context.Context, revision string) (string, error) {
|
|
ret := _mock.Called(ctx, revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for VerifyCommitSignature")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok {
|
|
return returnFunc(ctx, revision)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok {
|
|
r0 = returnFunc(ctx, revision)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, revision)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Client_VerifyCommitSignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyCommitSignature'
|
|
type Client_VerifyCommitSignature_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// VerifyCommitSignature is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - revision string
|
|
func (_e *Client_Expecter) VerifyCommitSignature(ctx any, revision any) *Client_VerifyCommitSignature_Call {
|
|
return &Client_VerifyCommitSignature_Call{Call: _e.mock.On("VerifyCommitSignature", ctx, revision)}
|
|
}
|
|
|
|
func (_c *Client_VerifyCommitSignature_Call) Run(run func(ctx context.Context, revision string)) *Client_VerifyCommitSignature_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_VerifyCommitSignature_Call) Return(s string, err error) *Client_VerifyCommitSignature_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Client_VerifyCommitSignature_Call) RunAndReturn(run func(ctx context.Context, revision string) (string, error)) *Client_VerifyCommitSignature_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|