mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
229 lines
6.9 KiB
Go
Generated
229 lines
6.9 KiB
Go
Generated
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewRepos creates a new instance of Repos. 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 NewRepos(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Repos {
|
|
mock := &Repos{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Repos is an autogenerated mock type for the Repos type
|
|
type Repos struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Repos_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Repos) EXPECT() *Repos_Expecter {
|
|
return &Repos_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetDirectories provides a mock function for the type Repos
|
|
func (_mock *Repos) GetDirectories(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool) ([]string, error) {
|
|
ret := _mock.Called(ctx, repoURL, revision, project, noRevisionCache, verifyCommit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetDirectories")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, bool) ([]string, error)); ok {
|
|
return returnFunc(ctx, repoURL, revision, project, noRevisionCache, verifyCommit)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, bool) []string); ok {
|
|
r0 = returnFunc(ctx, repoURL, revision, project, noRevisionCache, verifyCommit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, bool, bool) error); ok {
|
|
r1 = returnFunc(ctx, repoURL, revision, project, noRevisionCache, verifyCommit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repos_GetDirectories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDirectories'
|
|
type Repos_GetDirectories_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDirectories is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - repoURL string
|
|
// - revision string
|
|
// - project string
|
|
// - noRevisionCache bool
|
|
// - verifyCommit bool
|
|
func (_e *Repos_Expecter) GetDirectories(ctx interface{}, repoURL interface{}, revision interface{}, project interface{}, noRevisionCache interface{}, verifyCommit interface{}) *Repos_GetDirectories_Call {
|
|
return &Repos_GetDirectories_Call{Call: _e.mock.On("GetDirectories", ctx, repoURL, revision, project, noRevisionCache, verifyCommit)}
|
|
}
|
|
|
|
func (_c *Repos_GetDirectories_Call) Run(run func(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool)) *Repos_GetDirectories_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)
|
|
}
|
|
var arg4 bool
|
|
if args[4] != nil {
|
|
arg4 = args[4].(bool)
|
|
}
|
|
var arg5 bool
|
|
if args[5] != nil {
|
|
arg5 = args[5].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
arg4,
|
|
arg5,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repos_GetDirectories_Call) Return(strings []string, err error) *Repos_GetDirectories_Call {
|
|
_c.Call.Return(strings, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repos_GetDirectories_Call) RunAndReturn(run func(ctx context.Context, repoURL string, revision string, project string, noRevisionCache bool, verifyCommit bool) ([]string, error)) *Repos_GetDirectories_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetFiles provides a mock function for the type Repos
|
|
func (_mock *Repos) GetFiles(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool) (map[string][]byte, error) {
|
|
ret := _mock.Called(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetFiles")
|
|
}
|
|
|
|
var r0 map[string][]byte
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, string, bool, bool) (map[string][]byte, error)); ok {
|
|
return returnFunc(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, string, bool, bool) map[string][]byte); ok {
|
|
r0 = returnFunc(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[string][]byte)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, string, bool, bool) error); ok {
|
|
r1 = returnFunc(ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repos_GetFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFiles'
|
|
type Repos_GetFiles_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetFiles is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - repoURL string
|
|
// - revision string
|
|
// - project string
|
|
// - pattern string
|
|
// - noRevisionCache bool
|
|
// - verifyCommit bool
|
|
func (_e *Repos_Expecter) GetFiles(ctx interface{}, repoURL interface{}, revision interface{}, project interface{}, pattern interface{}, noRevisionCache interface{}, verifyCommit interface{}) *Repos_GetFiles_Call {
|
|
return &Repos_GetFiles_Call{Call: _e.mock.On("GetFiles", ctx, repoURL, revision, project, pattern, noRevisionCache, verifyCommit)}
|
|
}
|
|
|
|
func (_c *Repos_GetFiles_Call) Run(run func(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool)) *Repos_GetFiles_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)
|
|
}
|
|
var arg4 string
|
|
if args[4] != nil {
|
|
arg4 = args[4].(string)
|
|
}
|
|
var arg5 bool
|
|
if args[5] != nil {
|
|
arg5 = args[5].(bool)
|
|
}
|
|
var arg6 bool
|
|
if args[6] != nil {
|
|
arg6 = args[6].(bool)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
arg4,
|
|
arg5,
|
|
arg6,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repos_GetFiles_Call) Return(stringToBytes map[string][]byte, err error) *Repos_GetFiles_Call {
|
|
_c.Call.Return(stringToBytes, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repos_GetFiles_Call) RunAndReturn(run func(ctx context.Context, repoURL string, revision string, project string, pattern string, noRevisionCache bool, verifyCommit bool) (map[string][]byte, error)) *Repos_GetFiles_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|