mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* feat(hydrator): add sourceHydrator types Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> fix(codegen): use kube_codegen.sh deepcopy and client gen correctly Signed-off-by: Michael Crenshaw <[email protected]> deepcopy gen Signed-off-by: Michael Crenshaw <[email protected]> * feat(hydrator): add commit-server component Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> go mod tidy Signed-off-by: Michael Crenshaw <[email protected]> one test file for both implementations Signed-off-by: Michael Crenshaw <[email protected]> simplify Signed-off-by: Michael Crenshaw <[email protected]> fix test for linux Signed-off-by: Michael Crenshaw <[email protected]> fix git client mock Signed-off-by: Michael Crenshaw <[email protected]> fix git client mock Signed-off-by: Michael Crenshaw <[email protected]> address comments Signed-off-by: Michael Crenshaw <[email protected]> unit tests Signed-off-by: Michael Crenshaw <[email protected]> lint Signed-off-by: Michael Crenshaw <[email protected]> fix image, fix health checks, fix merge issue Signed-off-by: Michael Crenshaw <[email protected]> fix lint issues Signed-off-by: Michael Crenshaw <[email protected]> remove code that doesn't work for GHE Signed-off-by: Michael Crenshaw <[email protected]> changes from comments Signed-off-by: Michael Crenshaw <[email protected]> * feat(hydrator): enable controller Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> feat(hydrator): enable controller Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> allow opt-in Signed-off-by: Michael Crenshaw <[email protected]> separation between app controller and hydrator Signed-off-by: Michael Crenshaw <[email protected]> simplify diff Signed-off-by: Michael Crenshaw <[email protected]> todos Signed-off-by: Michael Crenshaw <[email protected]> simplify Signed-off-by: Michael Crenshaw <[email protected]> add dry sha to logs Signed-off-by: Michael Crenshaw <[email protected]> add app name to logs Signed-off-by: Michael Crenshaw <[email protected]> more logging, no caching Signed-off-by: Michael Crenshaw <[email protected]> fix cluster install Signed-off-by: Michael Crenshaw <[email protected]> don't interrupt an ongoing hydrate operation Signed-off-by: Michael Crenshaw <[email protected]> revert hydrate loop fix Signed-off-by: Michael Crenshaw <[email protected]> handle project-scoped repo creds Signed-off-by: Michael Crenshaw <[email protected]> codegen Signed-off-by: Michael Crenshaw <[email protected]> improve docs Signed-off-by: Michael Crenshaw <[email protected]> fixes from comments Signed-off-by: Michael Crenshaw <[email protected]> * set hydrator enabled key when using hydrator manifests Signed-off-by: Michael Crenshaw <[email protected]> fix manifests Signed-off-by: Michael Crenshaw <[email protected]> improve docs Signed-off-by: Michael Crenshaw <[email protected]> * feat(hydrator): enable controller Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> feat(hydrator): enable controller Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> allow opt-in Signed-off-by: Michael Crenshaw <[email protected]> separation between app controller and hydrator Signed-off-by: Michael Crenshaw <[email protected]> simplify diff Signed-off-by: Michael Crenshaw <[email protected]> todos Signed-off-by: Michael Crenshaw <[email protected]> simplify Signed-off-by: Michael Crenshaw <[email protected]> add dry sha to logs Signed-off-by: Michael Crenshaw <[email protected]> add app name to logs Signed-off-by: Michael Crenshaw <[email protected]> more logging, no caching Signed-off-by: Michael Crenshaw <[email protected]> fix cluster install Signed-off-by: Michael Crenshaw <[email protected]> don't interrupt an ongoing hydrate operation Signed-off-by: Michael Crenshaw <[email protected]> revert hydrate loop fix Signed-off-by: Michael Crenshaw <[email protected]> handle project-scoped repo creds Signed-off-by: Michael Crenshaw <[email protected]> codegen Signed-off-by: Michael Crenshaw <[email protected]> improve docs Signed-off-by: Michael Crenshaw <[email protected]> fixes from comments Signed-off-by: Michael Crenshaw <[email protected]> * feat(hydrator): add sourceHydrator types Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> fix(codegen): use kube_codegen.sh deepcopy and client gen correctly Signed-off-by: Michael Crenshaw <[email protected]> deepcopy gen Signed-off-by: Michael Crenshaw <[email protected]> * feat(hydrator): enable controller Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> feat(hydrator): enable controller Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> allow opt-in Signed-off-by: Michael Crenshaw <[email protected]> separation between app controller and hydrator Signed-off-by: Michael Crenshaw <[email protected]> simplify diff Signed-off-by: Michael Crenshaw <[email protected]> todos Signed-off-by: Michael Crenshaw <[email protected]> simplify Signed-off-by: Michael Crenshaw <[email protected]> add dry sha to logs Signed-off-by: Michael Crenshaw <[email protected]> add app name to logs Signed-off-by: Michael Crenshaw <[email protected]> more logging, no caching Signed-off-by: Michael Crenshaw <[email protected]> fix cluster install Signed-off-by: Michael Crenshaw <[email protected]> don't interrupt an ongoing hydrate operation Signed-off-by: Michael Crenshaw <[email protected]> revert hydrate loop fix Signed-off-by: Michael Crenshaw <[email protected]> handle project-scoped repo creds Signed-off-by: Michael Crenshaw <[email protected]> codegen Signed-off-by: Michael Crenshaw <[email protected]> * feat(hydrator): write credentials handling + UI Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> feat(hydrator): enable controller Co-authored-by: Alexandre Gaudreault <[email protected]> Co-authored-by: Omer Azmon <[email protected]> Co-authored-by: daengdaengLee <[email protected]> Co-authored-by: Juwon Hwang (Kevin) <[email protected]> Co-authored-by: thisishwan2 <[email protected]> Co-authored-by: mirageoasis <[email protected]> Co-authored-by: Robin Lieb <[email protected]> Co-authored-by: miiiinju1 <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> allow opt-in Signed-off-by: Michael Crenshaw <[email protected]> separation between app controller and hydrator Signed-off-by: Michael Crenshaw <[email protected]> simplify diff Signed-off-by: Michael Crenshaw <[email protected]> todos Signed-off-by: Michael Crenshaw <[email protected]> simplify Signed-off-by: Michael Crenshaw <[email protected]> add dry sha to logs Signed-off-by: Michael Crenshaw <[email protected]> add app name to logs Signed-off-by: Michael Crenshaw <[email protected]> more logging, no caching Signed-off-by: Michael Crenshaw <[email protected]> fix cluster install Signed-off-by: Michael Crenshaw <[email protected]> don't interrupt an ongoing hydrate operation Signed-off-by: Michael Crenshaw <[email protected]> revert hydrate loop fix Signed-off-by: Michael Crenshaw <[email protected]> feat(hydrator): write credentials handling + UI Signed-off-by: Michael Crenshaw <[email protected]> WIP: add new APIs for write creds Signed-off-by: Michael Crenshaw <[email protected]> write api and template api Signed-off-by: Michael Crenshaw <[email protected]> fix time function Signed-off-by: Michael Crenshaw <[email protected]> fix lint issues Signed-off-by: Michael Crenshaw <[email protected]> don't enrich with read creds Signed-off-by: Michael Crenshaw <[email protected]> revert tls change Signed-off-by: Michael Crenshaw <[email protected]> don't disable buttons in UI Signed-off-by: Michael Crenshaw <[email protected]> ask repo server for specific revision Signed-off-by: Michael Crenshaw <[email protected]> fixes Signed-off-by: Michael Crenshaw <[email protected]> lint ui Signed-off-by: Michael Crenshaw <[email protected]> remove unnecessary change Signed-off-by: Michael Crenshaw <[email protected]> fix test and lint Signed-off-by: Michael Crenshaw <[email protected]> lint Signed-off-by: Michael Crenshaw <[email protected]> enable hydrator for e2e tests Signed-off-by: Michael Crenshaw <[email protected]> * free disk space for e2e tests Signed-off-by: Michael Crenshaw <[email protected]> don't free disk space Signed-off-by: Michael Crenshaw <[email protected]> * free disk space for e2e tests Signed-off-by: Michael Crenshaw <[email protected]> * remove comment that breaks auth Signed-off-by: Michael Crenshaw <[email protected]> * try removing extra function Signed-off-by: Michael Crenshaw <[email protected]> * cleanup from comments Signed-off-by: Michael Crenshaw <[email protected]> * fix test Signed-off-by: Michael Crenshaw <[email protected]> --------- Signed-off-by: Michael Crenshaw <[email protected]>
538 lines
12 KiB
Go
Generated
538 lines
12 KiB
Go
Generated
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
git "github.com/argoproj/argo-cd/v2/util/git"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// Client is an autogenerated mock type for the Client type
|
|
type Client struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// ChangedFiles provides a mock function with given fields: revision, targetRevision
|
|
func (_m *Client) ChangedFiles(revision string, targetRevision string) ([]string, error) {
|
|
ret := _m.Called(revision, targetRevision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ChangedFiles")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) ([]string, error)); ok {
|
|
return rf(revision, targetRevision)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) []string); ok {
|
|
r0 = rf(revision, targetRevision)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(revision, targetRevision)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Checkout provides a mock function with given fields: revision, submoduleEnabled
|
|
func (_m *Client) Checkout(revision string, submoduleEnabled bool) (string, error) {
|
|
ret := _m.Called(revision, submoduleEnabled)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Checkout")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, bool) (string, error)); ok {
|
|
return rf(revision, submoduleEnabled)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, bool) string); ok {
|
|
r0 = rf(revision, submoduleEnabled)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
|
r1 = rf(revision, submoduleEnabled)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CheckoutOrNew provides a mock function with given fields: branch, base, submoduleEnabled
|
|
func (_m *Client) CheckoutOrNew(branch string, base string, submoduleEnabled bool) (string, error) {
|
|
ret := _m.Called(branch, base, submoduleEnabled)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckoutOrNew")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, bool) (string, error)); ok {
|
|
return rf(branch, base, submoduleEnabled)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, bool) string); ok {
|
|
r0 = rf(branch, base, submoduleEnabled)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, bool) error); ok {
|
|
r1 = rf(branch, base, submoduleEnabled)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CheckoutOrOrphan provides a mock function with given fields: branch, submoduleEnabled
|
|
func (_m *Client) CheckoutOrOrphan(branch string, submoduleEnabled bool) (string, error) {
|
|
ret := _m.Called(branch, submoduleEnabled)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CheckoutOrOrphan")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, bool) (string, error)); ok {
|
|
return rf(branch, submoduleEnabled)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, bool) string); ok {
|
|
r0 = rf(branch, submoduleEnabled)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
|
r1 = rf(branch, submoduleEnabled)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CommitAndPush provides a mock function with given fields: branch, message
|
|
func (_m *Client) CommitAndPush(branch string, message string) (string, error) {
|
|
ret := _m.Called(branch, message)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CommitAndPush")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok {
|
|
return rf(branch, message)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) string); ok {
|
|
r0 = rf(branch, message)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(branch, message)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CommitSHA provides a mock function with given fields:
|
|
func (_m *Client) CommitSHA() (string, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CommitSHA")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (string, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Fetch provides a mock function with given fields: revision
|
|
func (_m *Client) Fetch(revision string) error {
|
|
ret := _m.Called(revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Fetch")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(revision)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Init provides a mock function with given fields:
|
|
func (_m *Client) Init() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Init")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IsAnnotatedTag provides a mock function with given fields: _a0
|
|
func (_m *Client) IsAnnotatedTag(_a0 string) bool {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsAnnotatedTag")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IsRevisionPresent provides a mock function with given fields: revision
|
|
func (_m *Client) IsRevisionPresent(revision string) bool {
|
|
ret := _m.Called(revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IsRevisionPresent")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
|
r0 = rf(revision)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// LsFiles provides a mock function with given fields: path, enableNewGitFileGlobbing
|
|
func (_m *Client) LsFiles(path string, enableNewGitFileGlobbing bool) ([]string, error) {
|
|
ret := _m.Called(path, enableNewGitFileGlobbing)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsFiles")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok {
|
|
return rf(path, enableNewGitFileGlobbing)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, bool) []string); ok {
|
|
r0 = rf(path, enableNewGitFileGlobbing)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
|
r1 = rf(path, enableNewGitFileGlobbing)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LsLargeFiles provides a mock function with given fields:
|
|
func (_m *Client) LsLargeFiles() ([]string, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsLargeFiles")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() ([]string, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() []string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LsRefs provides a mock function with given fields:
|
|
func (_m *Client) LsRefs() (*git.Refs, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsRefs")
|
|
}
|
|
|
|
var r0 *git.Refs
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (*git.Refs, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() *git.Refs); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*git.Refs)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LsRemote provides a mock function with given fields: revision
|
|
func (_m *Client) LsRemote(revision string) (string, error) {
|
|
ret := _m.Called(revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for LsRemote")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
|
|
return rf(revision)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) string); ok {
|
|
r0 = rf(revision)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(revision)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// RemoveContents provides a mock function with given fields:
|
|
func (_m *Client) RemoveContents() (string, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveContents")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (string, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// RevisionMetadata provides a mock function with given fields: revision
|
|
func (_m *Client) RevisionMetadata(revision string) (*git.RevisionMetadata, error) {
|
|
ret := _m.Called(revision)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RevisionMetadata")
|
|
}
|
|
|
|
var r0 *git.RevisionMetadata
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (*git.RevisionMetadata, error)); ok {
|
|
return rf(revision)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) *git.RevisionMetadata); ok {
|
|
r0 = rf(revision)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*git.RevisionMetadata)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(revision)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Root provides a mock function with given fields:
|
|
func (_m *Client) Root() string {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Root")
|
|
}
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SetAuthor provides a mock function with given fields: name, email
|
|
func (_m *Client) SetAuthor(name string, email string) (string, error) {
|
|
ret := _m.Called(name, email)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetAuthor")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok {
|
|
return rf(name, email)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) string); ok {
|
|
r0 = rf(name, email)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(name, email)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Submodule provides a mock function with given fields:
|
|
func (_m *Client) Submodule() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Submodule")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// VerifyCommitSignature provides a mock function with given fields: _a0
|
|
func (_m *Client) VerifyCommitSignature(_a0 string) (string, error) {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for VerifyCommitSignature")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
|
|
return rf(_a0)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) string); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(_a0)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// 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
|
|
}
|