sharedtest

package
v0.0.0-...-e6a9d9d Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

README

sharedtest

sharedtest is a folder for shared test code.

Note that when authoring tests for shared, while also relying on utilities available in sharedtest, you'll need to put the test in the shared_test package, which is a Golang convention for "black box" testing of the shared package. This is because we would otherwise have a circular dependency of

shared
sharedtest
shared (test)

where shared (test) are _test.go files in the shared package.

Documentation

Overview

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Package sharedtest is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MultiRuns

func MultiRuns(runs shared.TestRuns) func(keys []shared.Key, dst interface{}) error

MultiRuns returns a DoAndReturn func that puts the given test runs in the dst interface for a shared.Datastore.GetMulti call.

func NewAEContext

func NewAEContext(stronglyConsistentDatastore bool) (context.Context, func(), error)

NewAEContext creates a new aetest context backed by dev_appserver whose logs are suppressed. It takes a boolean argument for whether the Datastore emulation should be strongly consistent.

func NewTestContext

func NewTestContext() context.Context

NewTestContext creates a new context.Context for small tests.

func SameDiffFilter

func SameDiffFilter(filter string) gomock.Matcher

SameDiffFilter returns a gomock matcher for a diff filter.

func SameKeys

func SameKeys(ids []int64) gomock.Matcher

SameKeys returns a gomock matcher for a Key slice.

func SameProductSpec

func SameProductSpec(spec string) gomock.Matcher

SameProductSpec returns a gomock matcher for a product spec.

Types

type Instance

type Instance interface {
	// Close kills the child api_server.py process, releasing its resources.
	io.Closer
	// NewRequest returns an *http.Request associated with this instance.
	NewRequest(method, urlStr string, body io.Reader) (*http.Request, error)
}

Instance represents a running instance of the development API Server.

func NewAEInstance

func NewAEInstance(stronglyConsistentDatastore bool) (Instance, error)

NewAEInstance creates a new test instance backed by Cloud Datastore emulator. It takes a boolean argument for whether the Datastore emulation should be strongly consistent.

type MockAppEngineAPI

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

MockAppEngineAPI is a mock of AppEngineAPI interface.

func NewMockAppEngineAPI

func NewMockAppEngineAPI(ctrl *gomock.Controller) *MockAppEngineAPI

NewMockAppEngineAPI creates a new mock instance.

func (*MockAppEngineAPI) Context

func (m *MockAppEngineAPI) Context() context.Context

Context mocks base method.

func (*MockAppEngineAPI) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAppEngineAPI) GetGitHubClient

func (m *MockAppEngineAPI) GetGitHubClient() (*github.Client, error)

GetGitHubClient mocks base method.

func (*MockAppEngineAPI) GetHTTPClient

func (m *MockAppEngineAPI) GetHTTPClient() *http.Client

GetHTTPClient mocks base method.

func (*MockAppEngineAPI) GetHTTPClientWithTimeout

func (m *MockAppEngineAPI) GetHTTPClientWithTimeout(arg0 time.Duration) *http.Client

GetHTTPClientWithTimeout mocks base method.

func (*MockAppEngineAPI) GetHostname

func (m *MockAppEngineAPI) GetHostname() string

GetHostname mocks base method.

func (*MockAppEngineAPI) GetResultsURL

func (m *MockAppEngineAPI) GetResultsURL(arg0 shared.TestRunFilter) *url.URL

GetResultsURL mocks base method.

func (*MockAppEngineAPI) GetResultsUploadURL

func (m *MockAppEngineAPI) GetResultsUploadURL() *url.URL

GetResultsUploadURL mocks base method.

func (*MockAppEngineAPI) GetRunsURL

func (m *MockAppEngineAPI) GetRunsURL(arg0 shared.TestRunFilter) *url.URL

GetRunsURL mocks base method.

func (*MockAppEngineAPI) GetServiceHostname

func (m *MockAppEngineAPI) GetServiceHostname(arg0 string) string

GetServiceHostname mocks base method.

func (*MockAppEngineAPI) GetUploader

func (m *MockAppEngineAPI) GetUploader(arg0 string) (shared.Uploader, error)

GetUploader mocks base method.

func (*MockAppEngineAPI) GetVersion

func (m *MockAppEngineAPI) GetVersion() string

GetVersion mocks base method.

func (*MockAppEngineAPI) GetVersionedHostname

func (m *MockAppEngineAPI) GetVersionedHostname() string

GetVersionedHostname mocks base method.

func (*MockAppEngineAPI) IsFeatureEnabled

func (m *MockAppEngineAPI) IsFeatureEnabled(arg0 string) bool

IsFeatureEnabled mocks base method.

func (*MockAppEngineAPI) ScheduleTask

func (m *MockAppEngineAPI) ScheduleTask(arg0, arg1, arg2 string, arg3 url.Values) (string, error)

ScheduleTask mocks base method.

type MockAppEngineAPIMockRecorder

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

MockAppEngineAPIMockRecorder is the mock recorder for MockAppEngineAPI.

func (*MockAppEngineAPIMockRecorder) Context

func (mr *MockAppEngineAPIMockRecorder) Context() *gomock.Call

Context indicates an expected call of Context.

func (*MockAppEngineAPIMockRecorder) GetGitHubClient

func (mr *MockAppEngineAPIMockRecorder) GetGitHubClient() *gomock.Call

GetGitHubClient indicates an expected call of GetGitHubClient.

func (*MockAppEngineAPIMockRecorder) GetHTTPClient

func (mr *MockAppEngineAPIMockRecorder) GetHTTPClient() *gomock.Call

GetHTTPClient indicates an expected call of GetHTTPClient.

func (*MockAppEngineAPIMockRecorder) GetHTTPClientWithTimeout

func (mr *MockAppEngineAPIMockRecorder) GetHTTPClientWithTimeout(arg0 interface{}) *gomock.Call

GetHTTPClientWithTimeout indicates an expected call of GetHTTPClientWithTimeout.

func (*MockAppEngineAPIMockRecorder) GetHostname

func (mr *MockAppEngineAPIMockRecorder) GetHostname() *gomock.Call

GetHostname indicates an expected call of GetHostname.

func (*MockAppEngineAPIMockRecorder) GetResultsURL

func (mr *MockAppEngineAPIMockRecorder) GetResultsURL(arg0 interface{}) *gomock.Call

GetResultsURL indicates an expected call of GetResultsURL.

func (*MockAppEngineAPIMockRecorder) GetResultsUploadURL

func (mr *MockAppEngineAPIMockRecorder) GetResultsUploadURL() *gomock.Call

GetResultsUploadURL indicates an expected call of GetResultsUploadURL.

func (*MockAppEngineAPIMockRecorder) GetRunsURL

func (mr *MockAppEngineAPIMockRecorder) GetRunsURL(arg0 interface{}) *gomock.Call

GetRunsURL indicates an expected call of GetRunsURL.

func (*MockAppEngineAPIMockRecorder) GetServiceHostname

func (mr *MockAppEngineAPIMockRecorder) GetServiceHostname(arg0 interface{}) *gomock.Call

GetServiceHostname indicates an expected call of GetServiceHostname.

func (*MockAppEngineAPIMockRecorder) GetUploader

func (mr *MockAppEngineAPIMockRecorder) GetUploader(arg0 interface{}) *gomock.Call

GetUploader indicates an expected call of GetUploader.

func (*MockAppEngineAPIMockRecorder) GetVersion

func (mr *MockAppEngineAPIMockRecorder) GetVersion() *gomock.Call

GetVersion indicates an expected call of GetVersion.

func (*MockAppEngineAPIMockRecorder) GetVersionedHostname

func (mr *MockAppEngineAPIMockRecorder) GetVersionedHostname() *gomock.Call

GetVersionedHostname indicates an expected call of GetVersionedHostname.

func (*MockAppEngineAPIMockRecorder) IsFeatureEnabled

func (mr *MockAppEngineAPIMockRecorder) IsFeatureEnabled(arg0 interface{}) *gomock.Call

IsFeatureEnabled indicates an expected call of IsFeatureEnabled.

func (*MockAppEngineAPIMockRecorder) ScheduleTask

func (mr *MockAppEngineAPIMockRecorder) ScheduleTask(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

ScheduleTask indicates an expected call of ScheduleTask.

type MockCachedStore

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

MockCachedStore is a mock of CachedStore interface.

func NewMockCachedStore

func NewMockCachedStore(ctrl *gomock.Controller) *MockCachedStore

NewMockCachedStore creates a new mock instance.

func (*MockCachedStore) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCachedStore) Get

func (m *MockCachedStore) Get(arg0, arg1, arg2 interface{}) error

Get mocks base method.

type MockCachedStoreMockRecorder

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

MockCachedStoreMockRecorder is the mock recorder for MockCachedStore.

func (*MockCachedStoreMockRecorder) Get

func (mr *MockCachedStoreMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call

Get indicates an expected call of Get.

type MockDatastore

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

MockDatastore is a mock of Datastore interface.

func NewMockDatastore

func NewMockDatastore(ctrl *gomock.Controller) *MockDatastore

NewMockDatastore creates a new mock instance.

func (*MockDatastore) Context

func (m *MockDatastore) Context() context.Context

Context mocks base method.

func (*MockDatastore) Done

func (m *MockDatastore) Done() interface{}

Done mocks base method.

func (*MockDatastore) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDatastore) Get

func (m *MockDatastore) Get(arg0 shared.Key, arg1 interface{}) error

Get mocks base method.

func (*MockDatastore) GetAll

func (m *MockDatastore) GetAll(arg0 shared.Query, arg1 interface{}) ([]shared.Key, error)

GetAll mocks base method.

func (*MockDatastore) GetMulti

func (m *MockDatastore) GetMulti(arg0 []shared.Key, arg1 interface{}) error

GetMulti mocks base method.

func (*MockDatastore) Insert

func (m *MockDatastore) Insert(arg0 shared.Key, arg1 interface{}) error

Insert mocks base method.

func (*MockDatastore) NewIDKey

func (m *MockDatastore) NewIDKey(arg0 string, arg1 int64) shared.Key

NewIDKey mocks base method.

func (*MockDatastore) NewIncompleteKey

func (m *MockDatastore) NewIncompleteKey(arg0 string) shared.Key

NewIncompleteKey mocks base method.

func (*MockDatastore) NewNameKey

func (m *MockDatastore) NewNameKey(arg0, arg1 string) shared.Key

NewNameKey mocks base method.

func (*MockDatastore) NewQuery

func (m *MockDatastore) NewQuery(arg0 string) shared.Query

NewQuery mocks base method.

func (*MockDatastore) Put

func (m *MockDatastore) Put(arg0 shared.Key, arg1 interface{}) (shared.Key, error)

Put mocks base method.

func (*MockDatastore) PutMulti

func (m *MockDatastore) PutMulti(arg0 []shared.Key, arg1 interface{}) ([]shared.Key, error)

PutMulti mocks base method.

func (*MockDatastore) ReserveID

func (m *MockDatastore) ReserveID(arg0 string) (shared.Key, error)

ReserveID mocks base method.

func (*MockDatastore) TestRunQuery

func (m *MockDatastore) TestRunQuery() shared.TestRunQuery

TestRunQuery mocks base method.

func (*MockDatastore) Update

func (m *MockDatastore) Update(arg0 shared.Key, arg1 interface{}, arg2 func(interface{}) error) error

Update mocks base method.

type MockDatastoreMockRecorder

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

MockDatastoreMockRecorder is the mock recorder for MockDatastore.

func (*MockDatastoreMockRecorder) Context

func (mr *MockDatastoreMockRecorder) Context() *gomock.Call

Context indicates an expected call of Context.

func (*MockDatastoreMockRecorder) Done

Done indicates an expected call of Done.

func (*MockDatastoreMockRecorder) Get

func (mr *MockDatastoreMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockDatastoreMockRecorder) GetAll

func (mr *MockDatastoreMockRecorder) GetAll(arg0, arg1 interface{}) *gomock.Call

GetAll indicates an expected call of GetAll.

func (*MockDatastoreMockRecorder) GetMulti

func (mr *MockDatastoreMockRecorder) GetMulti(arg0, arg1 interface{}) *gomock.Call

GetMulti indicates an expected call of GetMulti.

func (*MockDatastoreMockRecorder) Insert

func (mr *MockDatastoreMockRecorder) Insert(arg0, arg1 interface{}) *gomock.Call

Insert indicates an expected call of Insert.

func (*MockDatastoreMockRecorder) NewIDKey

func (mr *MockDatastoreMockRecorder) NewIDKey(arg0, arg1 interface{}) *gomock.Call

NewIDKey indicates an expected call of NewIDKey.

func (*MockDatastoreMockRecorder) NewIncompleteKey

func (mr *MockDatastoreMockRecorder) NewIncompleteKey(arg0 interface{}) *gomock.Call

NewIncompleteKey indicates an expected call of NewIncompleteKey.

func (*MockDatastoreMockRecorder) NewNameKey

func (mr *MockDatastoreMockRecorder) NewNameKey(arg0, arg1 interface{}) *gomock.Call

NewNameKey indicates an expected call of NewNameKey.

func (*MockDatastoreMockRecorder) NewQuery

func (mr *MockDatastoreMockRecorder) NewQuery(arg0 interface{}) *gomock.Call

NewQuery indicates an expected call of NewQuery.

func (*MockDatastoreMockRecorder) Put

func (mr *MockDatastoreMockRecorder) Put(arg0, arg1 interface{}) *gomock.Call

Put indicates an expected call of Put.

func (*MockDatastoreMockRecorder) PutMulti

func (mr *MockDatastoreMockRecorder) PutMulti(arg0, arg1 interface{}) *gomock.Call

PutMulti indicates an expected call of PutMulti.

func (*MockDatastoreMockRecorder) ReserveID

func (mr *MockDatastoreMockRecorder) ReserveID(arg0 interface{}) *gomock.Call

ReserveID indicates an expected call of ReserveID.

func (*MockDatastoreMockRecorder) TestRunQuery

func (mr *MockDatastoreMockRecorder) TestRunQuery() *gomock.Call

TestRunQuery indicates an expected call of TestRunQuery.

func (*MockDatastoreMockRecorder) Update

func (mr *MockDatastoreMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockDiffAPI

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

MockDiffAPI is a mock of DiffAPI interface.

func NewMockDiffAPI

func NewMockDiffAPI(ctrl *gomock.Controller) *MockDiffAPI

NewMockDiffAPI creates a new mock instance.

func (*MockDiffAPI) EXPECT

func (m *MockDiffAPI) EXPECT() *MockDiffAPIMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDiffAPI) GetDiffURL

func (m *MockDiffAPI) GetDiffURL(arg0, arg1 shared.TestRun, arg2 *shared.DiffFilterParam) *url.URL

GetDiffURL mocks base method.

func (*MockDiffAPI) GetMasterDiffURL

func (m *MockDiffAPI) GetMasterDiffURL(arg0 shared.TestRun, arg1 *shared.DiffFilterParam) *url.URL

GetMasterDiffURL mocks base method.

func (*MockDiffAPI) GetRunsDiff

func (m *MockDiffAPI) GetRunsDiff(arg0, arg1 shared.TestRun, arg2 shared.DiffFilterParam, arg3 mapset.Set) (shared.RunDiff, error)

GetRunsDiff mocks base method.

type MockDiffAPIMockRecorder

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

MockDiffAPIMockRecorder is the mock recorder for MockDiffAPI.

func (*MockDiffAPIMockRecorder) GetDiffURL

func (mr *MockDiffAPIMockRecorder) GetDiffURL(arg0, arg1, arg2 interface{}) *gomock.Call

GetDiffURL indicates an expected call of GetDiffURL.

func (*MockDiffAPIMockRecorder) GetMasterDiffURL

func (mr *MockDiffAPIMockRecorder) GetMasterDiffURL(arg0, arg1 interface{}) *gomock.Call

GetMasterDiffURL indicates an expected call of GetMasterDiffURL.

func (*MockDiffAPIMockRecorder) GetRunsDiff

func (mr *MockDiffAPIMockRecorder) GetRunsDiff(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

GetRunsDiff indicates an expected call of GetRunsDiff.

type MockFetchBSF

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

MockFetchBSF is a mock of FetchBSF interface.

func NewMockFetchBSF

func NewMockFetchBSF(ctrl *gomock.Controller) *MockFetchBSF

NewMockFetchBSF creates a new mock instance.

func (*MockFetchBSF) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockFetchBSF) Fetch

func (m *MockFetchBSF) Fetch(arg0 bool) ([][]string, error)

Fetch mocks base method.

type MockFetchBSFMockRecorder

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

MockFetchBSFMockRecorder is the mock recorder for MockFetchBSF.

func (*MockFetchBSFMockRecorder) Fetch

func (mr *MockFetchBSFMockRecorder) Fetch(arg0 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch.

type MockGitHubAccessControl

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

MockGitHubAccessControl is a mock of GitHubAccessControl interface.

func NewMockGitHubAccessControl

func NewMockGitHubAccessControl(ctrl *gomock.Controller) *MockGitHubAccessControl

NewMockGitHubAccessControl creates a new mock instance.

func (*MockGitHubAccessControl) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGitHubAccessControl) IsValidAdmin

func (m *MockGitHubAccessControl) IsValidAdmin() (bool, error)

IsValidAdmin mocks base method.

func (*MockGitHubAccessControl) IsValidWPTMember

func (m *MockGitHubAccessControl) IsValidWPTMember() (bool, error)

IsValidWPTMember mocks base method.

type MockGitHubAccessControlMockRecorder

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

MockGitHubAccessControlMockRecorder is the mock recorder for MockGitHubAccessControl.

func (*MockGitHubAccessControlMockRecorder) IsValidAdmin

func (mr *MockGitHubAccessControlMockRecorder) IsValidAdmin() *gomock.Call

IsValidAdmin indicates an expected call of IsValidAdmin.

func (*MockGitHubAccessControlMockRecorder) IsValidWPTMember

func (mr *MockGitHubAccessControlMockRecorder) IsValidWPTMember() *gomock.Call

IsValidWPTMember indicates an expected call of IsValidWPTMember.

type MockGitHubOAuth

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

MockGitHubOAuth is a mock of GitHubOAuth interface.

func NewMockGitHubOAuth

func NewMockGitHubOAuth(ctrl *gomock.Controller) *MockGitHubOAuth

NewMockGitHubOAuth creates a new mock instance.

func (*MockGitHubOAuth) Context

func (m *MockGitHubOAuth) Context() context.Context

Context mocks base method.

func (*MockGitHubOAuth) Datastore

func (m *MockGitHubOAuth) Datastore() shared.Datastore

Datastore mocks base method.

func (*MockGitHubOAuth) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGitHubOAuth) GetAccessToken

func (m *MockGitHubOAuth) GetAccessToken() string

GetAccessToken mocks base method.

func (*MockGitHubOAuth) GetAuthCodeURL

func (m *MockGitHubOAuth) GetAuthCodeURL(arg0 string, arg1 ...oauth2.AuthCodeOption) string

GetAuthCodeURL mocks base method.

func (*MockGitHubOAuth) GetUser

func (m *MockGitHubOAuth) GetUser(arg0 *github.Client) (*github.User, error)

GetUser mocks base method.

func (*MockGitHubOAuth) NewClient

func (m *MockGitHubOAuth) NewClient(arg0 string) (*github.Client, error)

NewClient mocks base method.

func (*MockGitHubOAuth) SetRedirectURL

func (m *MockGitHubOAuth) SetRedirectURL(arg0 string)

SetRedirectURL mocks base method.

type MockGitHubOAuthMockRecorder

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

MockGitHubOAuthMockRecorder is the mock recorder for MockGitHubOAuth.

func (*MockGitHubOAuthMockRecorder) Context

func (mr *MockGitHubOAuthMockRecorder) Context() *gomock.Call

Context indicates an expected call of Context.

func (*MockGitHubOAuthMockRecorder) Datastore

func (mr *MockGitHubOAuthMockRecorder) Datastore() *gomock.Call

Datastore indicates an expected call of Datastore.

func (*MockGitHubOAuthMockRecorder) GetAccessToken

func (mr *MockGitHubOAuthMockRecorder) GetAccessToken() *gomock.Call

GetAccessToken indicates an expected call of GetAccessToken.

func (*MockGitHubOAuthMockRecorder) GetAuthCodeURL

func (mr *MockGitHubOAuthMockRecorder) GetAuthCodeURL(arg0 interface{}, arg1 ...interface{}) *gomock.Call

GetAuthCodeURL indicates an expected call of GetAuthCodeURL.

func (*MockGitHubOAuthMockRecorder) GetUser

func (mr *MockGitHubOAuthMockRecorder) GetUser(arg0 interface{}) *gomock.Call

GetUser indicates an expected call of GetUser.

func (*MockGitHubOAuthMockRecorder) NewClient

func (mr *MockGitHubOAuthMockRecorder) NewClient(arg0 interface{}) *gomock.Call

NewClient indicates an expected call of NewClient.

func (*MockGitHubOAuthMockRecorder) SetRedirectURL

func (mr *MockGitHubOAuthMockRecorder) SetRedirectURL(arg0 interface{}) *gomock.Call

SetRedirectURL indicates an expected call of SetRedirectURL.

type MockKey

type MockKey struct {
	ID       int64
	Name     string
	TypeName string
}

MockKey is a (very simple) mock shared.Key.MockKey. It is used because gomock can end up in a deadlock when, during a Matcher, we create another Matcher, e.g. mocking Datastore.GetKey(int64) with a DoAndReturn that creates a gomock generated MockKey, for which we'd mock Key.IntID(), resulted in deadlock.

func (MockKey) IntID

func (m MockKey) IntID() int64

IntID returns the ID.

func (MockKey) Kind

func (m MockKey) Kind() string

Kind returns the TypeName

func (MockKey) StringID

func (m MockKey) StringID() string

StringID returns the Name.

type MockMetadataFetcher

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

MockMetadataFetcher is a mock of MetadataFetcher interface.

func NewMockMetadataFetcher

func NewMockMetadataFetcher(ctrl *gomock.Controller) *MockMetadataFetcher

NewMockMetadataFetcher creates a new mock instance.

func (*MockMetadataFetcher) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMetadataFetcher) Fetch

func (m *MockMetadataFetcher) Fetch() (*string, map[string][]byte, error)

Fetch mocks base method.

type MockMetadataFetcherMockRecorder

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

MockMetadataFetcherMockRecorder is the mock recorder for MockMetadataFetcher.

func (*MockMetadataFetcherMockRecorder) Fetch

Fetch indicates an expected call of Fetch.

type MockObjectCache

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

MockObjectCache is a mock of ObjectCache interface.

func NewMockObjectCache

func NewMockObjectCache(ctrl *gomock.Controller) *MockObjectCache

NewMockObjectCache creates a new mock instance.

func (*MockObjectCache) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockObjectCache) Get

func (m *MockObjectCache) Get(arg0, arg1 interface{}) error

Get mocks base method.

func (*MockObjectCache) Put

func (m *MockObjectCache) Put(arg0, arg1 interface{}) error

Put mocks base method.

type MockObjectCacheMockRecorder

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

MockObjectCacheMockRecorder is the mock recorder for MockObjectCache.

func (*MockObjectCacheMockRecorder) Get

func (mr *MockObjectCacheMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockObjectCacheMockRecorder) Put

func (mr *MockObjectCacheMockRecorder) Put(arg0, arg1 interface{}) *gomock.Call

Put indicates an expected call of Put.

type MockObjectStore

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

MockObjectStore is a mock of ObjectStore interface.

func NewMockObjectStore

func NewMockObjectStore(ctrl *gomock.Controller) *MockObjectStore

NewMockObjectStore creates a new mock instance.

func (*MockObjectStore) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockObjectStore) Get

func (m *MockObjectStore) Get(arg0, arg1 interface{}) error

Get mocks base method.

type MockObjectStoreMockRecorder

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

MockObjectStoreMockRecorder is the mock recorder for MockObjectStore.

func (*MockObjectStoreMockRecorder) Get

func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call

Get indicates an expected call of Get.

type MockReadCloser

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

MockReadCloser is a mock io.ReadCloser for testing.

func NewMockReadCloser

func NewMockReadCloser(t *testing.T, data []byte) *MockReadCloser

NewMockReadCloser creates a new MockWriteCloser.

func (*MockReadCloser) Close

func (mrc *MockReadCloser) Close() error

Close closes the ReadCloser.

func (*MockReadCloser) IsClosed

func (mrc *MockReadCloser) IsClosed() bool

IsClosed returns whether the ReadCloser has been closed.

func (*MockReadCloser) Read

func (mrc *MockReadCloser) Read(p []byte) (n int, err error)

type MockReadWritable

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

MockReadWritable is a mock of ReadWritable interface.

func NewMockReadWritable

func NewMockReadWritable(ctrl *gomock.Controller) *MockReadWritable

NewMockReadWritable creates a new mock instance.

func (*MockReadWritable) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockReadWritable) NewReadCloser

func (m *MockReadWritable) NewReadCloser(arg0 interface{}) (io.ReadCloser, error)

NewReadCloser mocks base method.

func (*MockReadWritable) NewWriteCloser

func (m *MockReadWritable) NewWriteCloser(arg0 interface{}) (io.WriteCloser, error)

NewWriteCloser mocks base method.

type MockReadWritableMockRecorder

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

MockReadWritableMockRecorder is the mock recorder for MockReadWritable.

func (*MockReadWritableMockRecorder) NewReadCloser

func (mr *MockReadWritableMockRecorder) NewReadCloser(arg0 interface{}) *gomock.Call

NewReadCloser indicates an expected call of NewReadCloser.

func (*MockReadWritableMockRecorder) NewWriteCloser

func (mr *MockReadWritableMockRecorder) NewWriteCloser(arg0 interface{}) *gomock.Call

NewWriteCloser indicates an expected call of NewWriteCloser.

type MockReadable

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

MockReadable is a mock of Readable interface.

func NewMockReadable

func NewMockReadable(ctrl *gomock.Controller) *MockReadable

NewMockReadable creates a new mock instance.

func (*MockReadable) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockReadable) NewReadCloser

func (m *MockReadable) NewReadCloser(arg0 interface{}) (io.ReadCloser, error)

NewReadCloser mocks base method.

type MockReadableMockRecorder

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

MockReadableMockRecorder is the mock recorder for MockReadable.

func (*MockReadableMockRecorder) NewReadCloser

func (mr *MockReadableMockRecorder) NewReadCloser(arg0 interface{}) *gomock.Call

NewReadCloser indicates an expected call of NewReadCloser.

type MockRedisSet

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

MockRedisSet is a mock of RedisSet interface.

func NewMockRedisSet

func NewMockRedisSet(ctrl *gomock.Controller) *MockRedisSet

NewMockRedisSet creates a new mock instance.

func (*MockRedisSet) Add

func (m *MockRedisSet) Add(arg0, arg1 string) error

Add mocks base method.

func (*MockRedisSet) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRedisSet) GetAll

func (m *MockRedisSet) GetAll(arg0 string) ([]string, error)

GetAll mocks base method.

func (*MockRedisSet) Remove

func (m *MockRedisSet) Remove(arg0, arg1 string) error

Remove mocks base method.

type MockRedisSetMockRecorder

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

MockRedisSetMockRecorder is the mock recorder for MockRedisSet.

func (*MockRedisSetMockRecorder) Add

func (mr *MockRedisSetMockRecorder) Add(arg0, arg1 interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockRedisSetMockRecorder) GetAll

func (mr *MockRedisSetMockRecorder) GetAll(arg0 interface{}) *gomock.Call

GetAll indicates an expected call of GetAll.

func (*MockRedisSetMockRecorder) Remove

func (mr *MockRedisSetMockRecorder) Remove(arg0, arg1 interface{}) *gomock.Call

Remove indicates an expected call of Remove.

type MockTestRunQuery

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

MockTestRunQuery is a mock of TestRunQuery interface.

func NewMockTestRunQuery

func NewMockTestRunQuery(ctrl *gomock.Controller) *MockTestRunQuery

NewMockTestRunQuery creates a new mock instance.

func (*MockTestRunQuery) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTestRunQuery) GetAlignedRunSHAs

func (m *MockTestRunQuery) GetAlignedRunSHAs(arg0 shared.ProductSpecs, arg1 mapset.Set, arg2, arg3 *time.Time, arg4, arg5 *int) ([]string, map[string]shared.KeysByProduct, error)

GetAlignedRunSHAs mocks base method.

func (*MockTestRunQuery) LoadTestRunKeys

func (m *MockTestRunQuery) LoadTestRunKeys(arg0 []shared.ProductSpec, arg1 mapset.Set, arg2 []string, arg3, arg4 *time.Time, arg5, arg6 *int) (shared.KeysByProduct, error)

LoadTestRunKeys mocks base method.

func (*MockTestRunQuery) LoadTestRuns

func (m *MockTestRunQuery) LoadTestRuns(arg0 []shared.ProductSpec, arg1 mapset.Set, arg2 []string, arg3, arg4 *time.Time, arg5, arg6 *int) (shared.TestRunsByProduct, error)

LoadTestRuns mocks base method.

func (*MockTestRunQuery) LoadTestRunsByKeys

func (m *MockTestRunQuery) LoadTestRunsByKeys(arg0 shared.KeysByProduct) (shared.TestRunsByProduct, error)

LoadTestRunsByKeys mocks base method.

type MockTestRunQueryMockRecorder

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

MockTestRunQueryMockRecorder is the mock recorder for MockTestRunQuery.

func (*MockTestRunQueryMockRecorder) GetAlignedRunSHAs

func (mr *MockTestRunQueryMockRecorder) GetAlignedRunSHAs(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call

GetAlignedRunSHAs indicates an expected call of GetAlignedRunSHAs.

func (*MockTestRunQueryMockRecorder) LoadTestRunKeys

func (mr *MockTestRunQueryMockRecorder) LoadTestRunKeys(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call

LoadTestRunKeys indicates an expected call of LoadTestRunKeys.

func (*MockTestRunQueryMockRecorder) LoadTestRuns

func (mr *MockTestRunQueryMockRecorder) LoadTestRuns(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call

LoadTestRuns indicates an expected call of LoadTestRuns.

func (*MockTestRunQueryMockRecorder) LoadTestRunsByKeys

func (mr *MockTestRunQueryMockRecorder) LoadTestRunsByKeys(arg0 interface{}) *gomock.Call

LoadTestRunsByKeys indicates an expected call of LoadTestRunsByKeys.

type MockTriageMetadata

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

MockTriageMetadata is a mock of TriageMetadata interface.

func NewMockTriageMetadata

func NewMockTriageMetadata(ctrl *gomock.Controller) *MockTriageMetadata

NewMockTriageMetadata creates a new mock instance.

func (*MockTriageMetadata) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTriageMetadata) Triage

Triage mocks base method.

type MockTriageMetadataMockRecorder

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

MockTriageMetadataMockRecorder is the mock recorder for MockTriageMetadata.

func (*MockTriageMetadataMockRecorder) Triage

func (mr *MockTriageMetadataMockRecorder) Triage(arg0 interface{}) *gomock.Call

Triage indicates an expected call of Triage.

type MockWriteCloser

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

MockWriteCloser is a mock io.WriteCloser for testing.

func NewMockWriteCloser

func NewMockWriteCloser(t *testing.T) *MockWriteCloser

NewMockWriteCloser creates a new MockWriteCloser.

func (*MockWriteCloser) Bytes

func (mwc *MockWriteCloser) Bytes() []byte

Bytes returns the bytes written to the WriteCloser.

func (*MockWriteCloser) Close

func (mwc *MockWriteCloser) Close() error

Close closes the WriteCloser.

func (*MockWriteCloser) IsClosed

func (mwc *MockWriteCloser) IsClosed() bool

IsClosed indicates whether the WriteCloser has been closed.

func (*MockWriteCloser) Write

func (mwc *MockWriteCloser) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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