bb_testutils

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

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

Go to latest
Published: Dec 27, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockBBURL = "mock-buildbucket.appspot.com"

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	*buildbucket.Client
	// contains filtered or unexported fields
}

MockClient is a wrapper around Client which doesn't actually perform API calls but instead simply returns mock results. Call any of the Mock* methods before calling the corresponding method on Client, and the mocked result will be returned.

func NewMockClient

func NewMockClient(t sktest.TestingT) *MockClient

func (*MockClient) MockCancelBuilds

func (c *MockClient) MockCancelBuilds(buildID int64, summaryMarkdown string, rv *buildbucketpb.BatchResponse, rvErr error)

func (*MockClient) MockGetBuild

func (c *MockClient) MockGetBuild(id int64, rv *buildbucketpb.Build, rvErr error)

func (*MockClient) MockGetTrybotsForCL

func (c *MockClient) MockGetTrybotsForCL(issueID, patchsetID int64, gerritUrl string, rv []*buildbucketpb.Build, rvErr error)

func (*MockClient) MockScheduleBuilds

func (c *MockClient) MockScheduleBuilds(b, tagName, tagValue, gerritURL, repo, bbProject, bbBucket string, issue, patchset int64, rv *buildbucketpb.BatchResponse, rvErr error)

func (*MockClient) MockSearchBuilds

func (c *MockClient) MockSearchBuilds(pred *buildbucketpb.BuildPredicate, rv []*buildbucketpb.Build, rvErr error)

func (*MockClient) MockStartBuild

func (c *MockClient) MockStartBuild(buildId int64, taskId string, rv *buildbucketpb.StartBuildResponse, rvErr error)

Jump to

Keyboard shortcuts

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