testutils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSemver

func NewSemver(t *testing.T, v string) version.Semver

NewSemver is a test utility to create a new SemVer from a string.

func NewSemverP

func NewSemverP(t *testing.T, v string) *version.Semver

NewSemverP is a test utility to create a new SemVer pointer from a string.

Types

type FakeClient

type FakeClient struct {
	FileData string

	GetFileError           []error
	UpdateFileError        []error
	CreateRefError         []error
	CreatePullRequestError []error
	// contains filtered or unexported fields
}

FakeClient implements the Client interface. It is used for testing.

func (*FakeClient) CreatePullRequest

func (c *FakeClient) CreatePullRequest(ctx context.Context, opts *client.Options, title, body string) error

func (*FakeClient) CreateRef

func (c *FakeClient) CreateRef(ctx context.Context, opts *client.Options) error

func (*FakeClient) GetFile

func (c *FakeClient) GetFile(ctx context.Context, opts *client.Options, path string) (string, error)

func (*FakeClient) UpdateFile

func (c *FakeClient) UpdateFile(ctx context.Context, opts *client.Options, path string, msg string, contents []byte) error

Jump to

Keyboard shortcuts

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