test

package
v0.0.0-...-6dcb528 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFakeConfig

func CreateFakeConfig() *configuration.Configuration

func CreateFakeExecutor

func CreateFakeExecutor() types.Executor

func CreateFakeHookContext

func CreateFakeHookContext(inOut io.IO, conf *configuration.Configuration, repo git.Repo) *app.Context

Types

type IOMock

type IOMock struct {
	Out []string
	// contains filtered or unexported fields
}

func CreateFakeIO

func CreateFakeIO() *IOMock

func (*IOMock) Argument

func (inOut *IOMock) Argument(name, defaultValue string) string

func (*IOMock) Arguments

func (inOut *IOMock) Arguments() map[string]string

func (*IOMock) Ask

func (inOut *IOMock) Ask(message string, defaultValue string) string

func (*IOMock) Input

func (inOut *IOMock) Input() io.Input

func (*IOMock) IsDebug

func (inOut *IOMock) IsDebug() bool

func (*IOMock) IsInteractive

func (inOut *IOMock) IsInteractive() bool

func (*IOMock) IsQuiet

func (inOut *IOMock) IsQuiet() bool

func (*IOMock) IsVerbose

func (inOut *IOMock) IsVerbose() bool

func (*IOMock) Option

func (inOut *IOMock) Option(name, defaultValue string) string

func (*IOMock) Options

func (inOut *IOMock) Options() map[string]string

func (*IOMock) SetArguments

func (inOut *IOMock) SetArguments(args map[string]string)

func (*IOMock) SetOptions

func (inOut *IOMock) SetOptions(args map[string]string)

func (*IOMock) SetStdIn

func (inOut *IOMock) SetStdIn(input []string)

func (*IOMock) StandardInput

func (inOut *IOMock) StandardInput() []string

func (*IOMock) Verbosity

func (inOut *IOMock) Verbosity() int

func (*IOMock) Write

func (inOut *IOMock) Write(message string, newline bool, verbosity int)

type RepoMock

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

func CreateFakeRepo

func CreateFakeRepo() *RepoMock

func (*RepoMock) AbsPath

func (r *RepoMock) AbsPath() string

func (*RepoMock) BranchName

func (r *RepoMock) BranchName() string

func (*RepoMock) ChangedFiles

func (r *RepoMock) ChangedFiles(from, to string) ([]string, error)

func (*RepoMock) CommitMessage

func (r *RepoMock) CommitMessage(path string) (*types.CommitMessage, error)

func (*RepoMock) CommitsBetween

func (r *RepoMock) CommitsBetween(from string, to string) []*types.Commit

func (*RepoMock) ConfigValue

func (r *RepoMock) ConfigValue(value string, defaultValue string) string

func (*RepoMock) GitDir

func (r *RepoMock) GitDir() string

func (*RepoMock) HookExists

func (r *RepoMock) HookExists(hook string) bool

func (*RepoMock) HooksDir

func (r *RepoMock) HooksDir() string

func (*RepoMock) IsMerging

func (r *RepoMock) IsMerging() bool

func (*RepoMock) Path

func (r *RepoMock) Path() string

func (*RepoMock) PrepareCommitMessage

func (r *RepoMock) PrepareCommitMessage(path string, msg *types.CommitMessage) error

func (*RepoMock) SetBranch

func (r *RepoMock) SetBranch(name string) *RepoMock

func (*RepoMock) SetFiles

func (r *RepoMock) SetFiles(files []string) *RepoMock

func (*RepoMock) SetFilesError

func (r *RepoMock) SetFilesError(triggerError bool) *RepoMock

func (*RepoMock) StagedFiles

func (r *RepoMock) StagedFiles() ([]string, error)

Jump to

Keyboard shortcuts

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