contribtest

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockContrib

type MockContrib struct {
	StubIn
	StubOut
}

MockContrib mock contrib interface

func (*MockContrib) GetHeadSHA1

func (r *MockContrib) GetHeadSHA1() (string, error)

GetHeadSHA1 mock GetHeadSHA1

func (*MockContrib) Sync

func (r *MockContrib) Sync(sha1 string, uploads []string, deletes []string) (uploaded []string, deleted []string, err error)

Sync mock Sync

type StubIn

type StubIn struct {
	GetHeadSHA1Return    string
	GetHeadSHA1ReturnErr error

	SyncReturnUploaded func([]string) []string
	SyncReturnDeleted  func([]string) []string
	SyncReturnErr      error
}

StubIn mock calling source

type StubOut

type StubOut struct {
	GetHeadSHA1CallTimes int

	SyncCallTimes   int
	SyncCallSHA1    []string
	SyncCallUploads [][]string
	SyncCallDeletes [][]string
}

StubOut mock calling output

Jump to

Keyboard shortcuts

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