mock

package
v0.0.0-...-916d79e Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCache

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

func New

func New() *MockCache

New creates and returns a new git.Cache implementation that operates entirely in-memory

func (*MockCache) AddRepoFile

func (m *MockCache) AddRepoFile(repoURL, branch, path string, body []byte)

func (*MockCache) AssertBranchCreated

func (m *MockCache) AssertBranchCreated(t *testing.T, repoURL, fromBranch, newBranch string)

func (*MockCache) AssertCommitAndPush

func (m *MockCache) AssertCommitAndPush(t *testing.T, repoURL, branch, message, token string)

func (*MockCache) AssertFileWrittenToBranch

func (m *MockCache) AssertFileWrittenToBranch(t *testing.T, repoURL, branch, path string, body []byte)

func (*MockCache) CommitAndPushBranch

func (m *MockCache) CommitAndPushBranch(ctx context.Context, repoURL, branch, message, token string) error

CommitAndPushBranch fulfils the git.Cache interface.

func (*MockCache) CreateAndCheckoutBranch

func (m *MockCache) CreateAndCheckoutBranch(ctx context.Context, repoURL, fromBranch, newBranch string) error

CreateAndCheckoutBranch fulfils the git.Cache interface.

func (*MockCache) ReadFileFromBranch

func (m *MockCache) ReadFileFromBranch(ctx context.Context, repoURL, filePath, branch string) ([]byte, error)

ReadFileFromBranch fulfils the git.Cache interface.

func (*MockCache) WriteFileToBranchAndStage

func (m *MockCache) WriteFileToBranchAndStage(ctx context.Context, repoURL, branch, filePath string, data []byte) error

WriteFileToBranchAndStage fulfils the git.Cache interface.

Jump to

Keyboard shortcuts

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