testutils

package
v0.0.0-...-03d6fc4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FAKE_GERRIT_URL = "https://fake-skia-review.googlesource.com"
	FAKE_GITCOOKIES = ".googlesource.com\tTRUE\t/\tTRUE\t123\to\tgit-user.google.com=abc123"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockGerrit

type MockGerrit struct {
	Gerrit *gerrit.Gerrit
	Mock   *mockhttpclient.URLMock
	// contains filtered or unexported fields
}

MockGerrit is a GerritInterface implementation which mocks out requests to the server.

func NewGerrit

func NewGerrit(t testutils.TestingT, workdir string, isAndroid bool) *MockGerrit

NewGerrit returns a mocked Gerrit instance.

func (*MockGerrit) Abandon

func (g *MockGerrit) Abandon(ci *gerrit.ChangeInfo, msg string)

func (*MockGerrit) AssertEmpty

func (g *MockGerrit) AssertEmpty()

func (*MockGerrit) MakePostRequest

func (g *MockGerrit) MakePostRequest(ci *gerrit.ChangeInfo, msg string, labels map[string]int) (string, []byte)

func (*MockGerrit) MockAddComment

func (g *MockGerrit) MockAddComment(ci *gerrit.ChangeInfo, msg string)

func (*MockGerrit) MockGetIssueProperties

func (g *MockGerrit) MockGetIssueProperties(ci *gerrit.ChangeInfo)

func (*MockGerrit) MockGetTrybotResults

func (g *MockGerrit) MockGetTrybotResults(ci *gerrit.ChangeInfo, patchset int, results []*buildbucket.Build)

func (*MockGerrit) MockPost

func (g *MockGerrit) MockPost(ci *gerrit.ChangeInfo, msg string, labels map[string]int)

func (*MockGerrit) MockSetCQ

func (g *MockGerrit) MockSetCQ(ci *gerrit.ChangeInfo, msg string)

func (*MockGerrit) MockSetDryRun

func (g *MockGerrit) MockSetDryRun(ci *gerrit.ChangeInfo, msg string)

Jump to

Keyboard shortcuts

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