git

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package git provides auto-generated mocks for the git.Backend interface. This package should only be imported in test files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBackend

type MockBackend struct {
	mock.Mock
}

MockBackend is an autogenerated mock type for the Backend type

func NewMockBackend

func NewMockBackend(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBackend

NewMockBackend creates a new instance of MockBackend. 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 (*MockBackend) Clone

func (_mock *MockBackend) Clone(ctx context.Context, repoURL string, directory string) error

Clone provides a mock function for the type MockBackend

func (*MockBackend) DetectState

func (_mock *MockBackend) DetectState(ctx context.Context, directory string, configuredURL string) (*git.RepositoryState, error)

DetectState provides a mock function for the type MockBackend

func (*MockBackend) EXPECT

func (_m *MockBackend) EXPECT() *MockBackend_Expecter

func (*MockBackend) EnsureCloned

func (_mock *MockBackend) EnsureCloned(ctx context.Context, repoURL string, directory string, cloneStrategy string) error

EnsureCloned provides a mock function for the type MockBackend

func (*MockBackend) Fetch

func (_mock *MockBackend) Fetch(ctx context.Context, directory string) error

Fetch provides a mock function for the type MockBackend

func (*MockBackend) GetCommitCounts

func (_mock *MockBackend) GetCommitCounts(ctx context.Context, directory string) (int, int, error)

GetCommitCounts provides a mock function for the type MockBackend

func (*MockBackend) GetCurrentBranch

func (_mock *MockBackend) GetCurrentBranch(ctx context.Context, directory string) (string, error)

GetCurrentBranch provides a mock function for the type MockBackend

func (*MockBackend) GetDefaultBranch

func (_mock *MockBackend) GetDefaultBranch(ctx context.Context, directory string, repoURL string) (string, error)

GetDefaultBranch provides a mock function for the type MockBackend

func (*MockBackend) GetRevision

func (_mock *MockBackend) GetRevision(ctx context.Context, directory string) (string, error)

GetRevision provides a mock function for the type MockBackend

func (*MockBackend) GetStatus

func (_mock *MockBackend) GetStatus(ctx context.Context, directory string) (*git.Status, error)

GetStatus provides a mock function for the type MockBackend

func (*MockBackend) GetTrackingBranch

func (_mock *MockBackend) GetTrackingBranch(ctx context.Context, directory string) (string, error)

GetTrackingBranch provides a mock function for the type MockBackend

func (*MockBackend) IsDetached

func (_mock *MockBackend) IsDetached(ctx context.Context, directory string) (bool, error)

IsDetached provides a mock function for the type MockBackend

func (*MockBackend) IsGitRepository

func (_mock *MockBackend) IsGitRepository(ctx context.Context, directory string) (bool, error)

IsGitRepository provides a mock function for the type MockBackend

func (*MockBackend) Pull

func (_mock *MockBackend) Pull(ctx context.Context, directory string) error

Pull provides a mock function for the type MockBackend

func (*MockBackend) PullFFOnly

func (_mock *MockBackend) PullFFOnly(ctx context.Context, directory string) error

PullFFOnly provides a mock function for the type MockBackend

func (*MockBackend) StashPush

func (_mock *MockBackend) StashPush(ctx context.Context, directory string, message string) error

StashPush provides a mock function for the type MockBackend

type MockBackend_Clone_Call

type MockBackend_Clone_Call struct {
	*mock.Call
}

MockBackend_Clone_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clone'

func (*MockBackend_Clone_Call) Return

func (*MockBackend_Clone_Call) Run

func (_c *MockBackend_Clone_Call) Run(run func(ctx context.Context, repoURL string, directory string)) *MockBackend_Clone_Call

func (*MockBackend_Clone_Call) RunAndReturn

func (_c *MockBackend_Clone_Call) RunAndReturn(run func(ctx context.Context, repoURL string, directory string) error) *MockBackend_Clone_Call

type MockBackend_DetectState_Call

type MockBackend_DetectState_Call struct {
	*mock.Call
}

MockBackend_DetectState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectState'

func (*MockBackend_DetectState_Call) Return

func (*MockBackend_DetectState_Call) Run

func (_c *MockBackend_DetectState_Call) Run(run func(ctx context.Context, directory string, configuredURL string)) *MockBackend_DetectState_Call

func (*MockBackend_DetectState_Call) RunAndReturn

func (_c *MockBackend_DetectState_Call) RunAndReturn(run func(ctx context.Context, directory string, configuredURL string) (*git.RepositoryState, error)) *MockBackend_DetectState_Call

type MockBackend_EnsureCloned_Call

type MockBackend_EnsureCloned_Call struct {
	*mock.Call
}

MockBackend_EnsureCloned_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureCloned'

func (*MockBackend_EnsureCloned_Call) Return

func (*MockBackend_EnsureCloned_Call) Run

func (_c *MockBackend_EnsureCloned_Call) Run(run func(ctx context.Context, repoURL string, directory string, cloneStrategy string)) *MockBackend_EnsureCloned_Call

func (*MockBackend_EnsureCloned_Call) RunAndReturn

func (_c *MockBackend_EnsureCloned_Call) RunAndReturn(run func(ctx context.Context, repoURL string, directory string, cloneStrategy string) error) *MockBackend_EnsureCloned_Call

type MockBackend_Expecter

type MockBackend_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockBackend_Expecter) Clone

func (_e *MockBackend_Expecter) Clone(ctx interface{}, repoURL interface{}, directory interface{}) *MockBackend_Clone_Call

Clone is a helper method to define mock.On call

  • ctx context.Context
  • repoURL string
  • directory string

func (*MockBackend_Expecter) DetectState

func (_e *MockBackend_Expecter) DetectState(ctx interface{}, directory interface{}, configuredURL interface{}) *MockBackend_DetectState_Call

DetectState is a helper method to define mock.On call

  • ctx context.Context
  • directory string
  • configuredURL string

func (*MockBackend_Expecter) EnsureCloned

func (_e *MockBackend_Expecter) EnsureCloned(ctx interface{}, repoURL interface{}, directory interface{}, cloneStrategy interface{}) *MockBackend_EnsureCloned_Call

EnsureCloned is a helper method to define mock.On call

  • ctx context.Context
  • repoURL string
  • directory string
  • cloneStrategy string

func (*MockBackend_Expecter) Fetch

func (_e *MockBackend_Expecter) Fetch(ctx interface{}, directory interface{}) *MockBackend_Fetch_Call

Fetch is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) GetCommitCounts

func (_e *MockBackend_Expecter) GetCommitCounts(ctx interface{}, directory interface{}) *MockBackend_GetCommitCounts_Call

GetCommitCounts is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) GetCurrentBranch

func (_e *MockBackend_Expecter) GetCurrentBranch(ctx interface{}, directory interface{}) *MockBackend_GetCurrentBranch_Call

GetCurrentBranch is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) GetDefaultBranch

func (_e *MockBackend_Expecter) GetDefaultBranch(ctx interface{}, directory interface{}, repoURL interface{}) *MockBackend_GetDefaultBranch_Call

GetDefaultBranch is a helper method to define mock.On call

  • ctx context.Context
  • directory string
  • repoURL string

func (*MockBackend_Expecter) GetRevision

func (_e *MockBackend_Expecter) GetRevision(ctx interface{}, directory interface{}) *MockBackend_GetRevision_Call

GetRevision is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) GetStatus

func (_e *MockBackend_Expecter) GetStatus(ctx interface{}, directory interface{}) *MockBackend_GetStatus_Call

GetStatus is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) GetTrackingBranch

func (_e *MockBackend_Expecter) GetTrackingBranch(ctx interface{}, directory interface{}) *MockBackend_GetTrackingBranch_Call

GetTrackingBranch is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) IsDetached

func (_e *MockBackend_Expecter) IsDetached(ctx interface{}, directory interface{}) *MockBackend_IsDetached_Call

IsDetached is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) IsGitRepository

func (_e *MockBackend_Expecter) IsGitRepository(ctx interface{}, directory interface{}) *MockBackend_IsGitRepository_Call

IsGitRepository is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) Pull

func (_e *MockBackend_Expecter) Pull(ctx interface{}, directory interface{}) *MockBackend_Pull_Call

Pull is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) PullFFOnly

func (_e *MockBackend_Expecter) PullFFOnly(ctx interface{}, directory interface{}) *MockBackend_PullFFOnly_Call

PullFFOnly is a helper method to define mock.On call

  • ctx context.Context
  • directory string

func (*MockBackend_Expecter) StashPush

func (_e *MockBackend_Expecter) StashPush(ctx interface{}, directory interface{}, message interface{}) *MockBackend_StashPush_Call

StashPush is a helper method to define mock.On call

  • ctx context.Context
  • directory string
  • message string

type MockBackend_Fetch_Call

type MockBackend_Fetch_Call struct {
	*mock.Call
}

MockBackend_Fetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fetch'

func (*MockBackend_Fetch_Call) Return

func (*MockBackend_Fetch_Call) Run

func (_c *MockBackend_Fetch_Call) Run(run func(ctx context.Context, directory string)) *MockBackend_Fetch_Call

func (*MockBackend_Fetch_Call) RunAndReturn

func (_c *MockBackend_Fetch_Call) RunAndReturn(run func(ctx context.Context, directory string) error) *MockBackend_Fetch_Call

type MockBackend_GetCommitCounts_Call

type MockBackend_GetCommitCounts_Call struct {
	*mock.Call
}

MockBackend_GetCommitCounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommitCounts'

func (*MockBackend_GetCommitCounts_Call) Return

func (*MockBackend_GetCommitCounts_Call) Run

func (*MockBackend_GetCommitCounts_Call) RunAndReturn

func (_c *MockBackend_GetCommitCounts_Call) RunAndReturn(run func(ctx context.Context, directory string) (int, int, error)) *MockBackend_GetCommitCounts_Call

type MockBackend_GetCurrentBranch_Call

type MockBackend_GetCurrentBranch_Call struct {
	*mock.Call
}

MockBackend_GetCurrentBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentBranch'

func (*MockBackend_GetCurrentBranch_Call) Return

func (*MockBackend_GetCurrentBranch_Call) Run

func (*MockBackend_GetCurrentBranch_Call) RunAndReturn

type MockBackend_GetDefaultBranch_Call

type MockBackend_GetDefaultBranch_Call struct {
	*mock.Call
}

MockBackend_GetDefaultBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultBranch'

func (*MockBackend_GetDefaultBranch_Call) Return

func (*MockBackend_GetDefaultBranch_Call) Run

func (*MockBackend_GetDefaultBranch_Call) RunAndReturn

func (_c *MockBackend_GetDefaultBranch_Call) RunAndReturn(run func(ctx context.Context, directory string, repoURL string) (string, error)) *MockBackend_GetDefaultBranch_Call

type MockBackend_GetRevision_Call

type MockBackend_GetRevision_Call struct {
	*mock.Call
}

MockBackend_GetRevision_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRevision'

func (*MockBackend_GetRevision_Call) Return

func (*MockBackend_GetRevision_Call) Run

func (*MockBackend_GetRevision_Call) RunAndReturn

func (_c *MockBackend_GetRevision_Call) RunAndReturn(run func(ctx context.Context, directory string) (string, error)) *MockBackend_GetRevision_Call

type MockBackend_GetStatus_Call

type MockBackend_GetStatus_Call struct {
	*mock.Call
}

MockBackend_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus'

func (*MockBackend_GetStatus_Call) Return

func (*MockBackend_GetStatus_Call) Run

func (_c *MockBackend_GetStatus_Call) Run(run func(ctx context.Context, directory string)) *MockBackend_GetStatus_Call

func (*MockBackend_GetStatus_Call) RunAndReturn

func (_c *MockBackend_GetStatus_Call) RunAndReturn(run func(ctx context.Context, directory string) (*git.Status, error)) *MockBackend_GetStatus_Call

type MockBackend_GetTrackingBranch_Call

type MockBackend_GetTrackingBranch_Call struct {
	*mock.Call
}

MockBackend_GetTrackingBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTrackingBranch'

func (*MockBackend_GetTrackingBranch_Call) Return

func (*MockBackend_GetTrackingBranch_Call) Run

func (*MockBackend_GetTrackingBranch_Call) RunAndReturn

type MockBackend_IsDetached_Call

type MockBackend_IsDetached_Call struct {
	*mock.Call
}

MockBackend_IsDetached_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDetached'

func (*MockBackend_IsDetached_Call) Return

func (*MockBackend_IsDetached_Call) Run

func (*MockBackend_IsDetached_Call) RunAndReturn

func (_c *MockBackend_IsDetached_Call) RunAndReturn(run func(ctx context.Context, directory string) (bool, error)) *MockBackend_IsDetached_Call

type MockBackend_IsGitRepository_Call

type MockBackend_IsGitRepository_Call struct {
	*mock.Call
}

MockBackend_IsGitRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGitRepository'

func (*MockBackend_IsGitRepository_Call) Return

func (*MockBackend_IsGitRepository_Call) Run

func (*MockBackend_IsGitRepository_Call) RunAndReturn

func (_c *MockBackend_IsGitRepository_Call) RunAndReturn(run func(ctx context.Context, directory string) (bool, error)) *MockBackend_IsGitRepository_Call

type MockBackend_PullFFOnly_Call

type MockBackend_PullFFOnly_Call struct {
	*mock.Call
}

MockBackend_PullFFOnly_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PullFFOnly'

func (*MockBackend_PullFFOnly_Call) Return

func (*MockBackend_PullFFOnly_Call) Run

func (*MockBackend_PullFFOnly_Call) RunAndReturn

func (_c *MockBackend_PullFFOnly_Call) RunAndReturn(run func(ctx context.Context, directory string) error) *MockBackend_PullFFOnly_Call

type MockBackend_Pull_Call

type MockBackend_Pull_Call struct {
	*mock.Call
}

MockBackend_Pull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pull'

func (*MockBackend_Pull_Call) Return

func (*MockBackend_Pull_Call) Run

func (_c *MockBackend_Pull_Call) Run(run func(ctx context.Context, directory string)) *MockBackend_Pull_Call

func (*MockBackend_Pull_Call) RunAndReturn

func (_c *MockBackend_Pull_Call) RunAndReturn(run func(ctx context.Context, directory string) error) *MockBackend_Pull_Call

type MockBackend_StashPush_Call

type MockBackend_StashPush_Call struct {
	*mock.Call
}

MockBackend_StashPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StashPush'

func (*MockBackend_StashPush_Call) Return

func (*MockBackend_StashPush_Call) Run

func (_c *MockBackend_StashPush_Call) Run(run func(ctx context.Context, directory string, message string)) *MockBackend_StashPush_Call

func (*MockBackend_StashPush_Call) RunAndReturn

func (_c *MockBackend_StashPush_Call) RunAndReturn(run func(ctx context.Context, directory string, message string) error) *MockBackend_StashPush_Call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL