sharedtest

package
v0.0.0-...-7653347 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 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(filter 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(filter shared.TestRunFilter) *url.URL

GetRunsURL mocks base method.

func (*MockAppEngineAPI) GetServiceHostname

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

GetServiceHostname mocks base method.

func (*MockAppEngineAPI) GetUploader

func (m *MockAppEngineAPI) GetUploader(uploader 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(featureName string) bool

IsFeatureEnabled mocks base method.

func (*MockAppEngineAPI) ScheduleTask

func (m *MockAppEngineAPI) ScheduleTask(queueName, taskName, target string, params 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 any) *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(filter any) *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(filter any) *gomock.Call

GetRunsURL indicates an expected call of GetRunsURL.

func (*MockAppEngineAPIMockRecorder) GetServiceHostname

func (mr *MockAppEngineAPIMockRecorder) GetServiceHostname(service any) *gomock.Call

GetServiceHostname indicates an expected call of GetServiceHostname.

func (*MockAppEngineAPIMockRecorder) GetUploader

func (mr *MockAppEngineAPIMockRecorder) GetUploader(uploader any) *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(featureName any) *gomock.Call

IsFeatureEnabled indicates an expected call of IsFeatureEnabled.

func (*MockAppEngineAPIMockRecorder) ScheduleTask

func (mr *MockAppEngineAPIMockRecorder) ScheduleTask(queueName, taskName, target, params any) *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(cacheID, storeID, value any) 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(cacheID, storeID, value any) *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() any

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(key shared.Key, dst any) error

Get mocks base method.

func (*MockDatastore) GetAll

func (m *MockDatastore) GetAll(q shared.Query, dst any) ([]shared.Key, error)

GetAll mocks base method.

func (*MockDatastore) GetMulti

func (m *MockDatastore) GetMulti(keys []shared.Key, dst any) error

GetMulti mocks base method.

func (*MockDatastore) Insert

func (m *MockDatastore) Insert(key shared.Key, src any) error

Insert mocks base method.

func (*MockDatastore) NewIDKey

func (m *MockDatastore) NewIDKey(typeName string, id int64) shared.Key

NewIDKey mocks base method.

func (*MockDatastore) NewIncompleteKey

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

NewIncompleteKey mocks base method.

func (*MockDatastore) NewNameKey

func (m *MockDatastore) NewNameKey(typeName, name string) shared.Key

NewNameKey mocks base method.

func (*MockDatastore) NewQuery

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

NewQuery mocks base method.

func (*MockDatastore) Put

func (m *MockDatastore) Put(key shared.Key, src any) (shared.Key, error)

Put mocks base method.

func (*MockDatastore) PutMulti

func (m *MockDatastore) PutMulti(keys []shared.Key, src any) ([]shared.Key, error)

PutMulti mocks base method.

func (*MockDatastore) ReserveID

func (m *MockDatastore) ReserveID(typeName 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(key shared.Key, dst any, mutator func(any) 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(key, dst any) *gomock.Call

Get indicates an expected call of Get.

func (*MockDatastoreMockRecorder) GetAll

func (mr *MockDatastoreMockRecorder) GetAll(q, dst any) *gomock.Call

GetAll indicates an expected call of GetAll.

func (*MockDatastoreMockRecorder) GetMulti

func (mr *MockDatastoreMockRecorder) GetMulti(keys, dst any) *gomock.Call

GetMulti indicates an expected call of GetMulti.

func (*MockDatastoreMockRecorder) Insert

func (mr *MockDatastoreMockRecorder) Insert(key, src any) *gomock.Call

Insert indicates an expected call of Insert.

func (*MockDatastoreMockRecorder) NewIDKey

func (mr *MockDatastoreMockRecorder) NewIDKey(typeName, id any) *gomock.Call

NewIDKey indicates an expected call of NewIDKey.

func (*MockDatastoreMockRecorder) NewIncompleteKey

func (mr *MockDatastoreMockRecorder) NewIncompleteKey(typeName any) *gomock.Call

NewIncompleteKey indicates an expected call of NewIncompleteKey.

func (*MockDatastoreMockRecorder) NewNameKey

func (mr *MockDatastoreMockRecorder) NewNameKey(typeName, name any) *gomock.Call

NewNameKey indicates an expected call of NewNameKey.

func (*MockDatastoreMockRecorder) NewQuery

func (mr *MockDatastoreMockRecorder) NewQuery(typeName any) *gomock.Call

NewQuery indicates an expected call of NewQuery.

func (*MockDatastoreMockRecorder) Put

func (mr *MockDatastoreMockRecorder) Put(key, src any) *gomock.Call

Put indicates an expected call of Put.

func (*MockDatastoreMockRecorder) PutMulti

func (mr *MockDatastoreMockRecorder) PutMulti(keys, src any) *gomock.Call

PutMulti indicates an expected call of PutMulti.

func (*MockDatastoreMockRecorder) ReserveID

func (mr *MockDatastoreMockRecorder) ReserveID(typeName any) *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(key, dst, mutator any) *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(before, after shared.TestRun, diffFilter *shared.DiffFilterParam) *url.URL

GetDiffURL mocks base method.

func (*MockDiffAPI) GetMasterDiffURL

func (m *MockDiffAPI) GetMasterDiffURL(testRun shared.TestRun, diffFilter *shared.DiffFilterParam) *url.URL

GetMasterDiffURL mocks base method.

func (*MockDiffAPI) GetRunsDiff

func (m *MockDiffAPI) GetRunsDiff(before, after shared.TestRun, filter shared.DiffFilterParam, paths 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(before, after, diffFilter any) *gomock.Call

GetDiffURL indicates an expected call of GetDiffURL.

func (*MockDiffAPIMockRecorder) GetMasterDiffURL

func (mr *MockDiffAPIMockRecorder) GetMasterDiffURL(testRun, diffFilter any) *gomock.Call

GetMasterDiffURL indicates an expected call of GetMasterDiffURL.

func (*MockDiffAPIMockRecorder) GetRunsDiff

func (mr *MockDiffAPIMockRecorder) GetRunsDiff(before, after, filter, paths any) *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(isExperimental 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(isExperimental any) *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(state string, opts ...oauth2.AuthCodeOption) string

GetAuthCodeURL mocks base method.

func (*MockGitHubOAuth) GetUser

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

GetUser mocks base method.

func (*MockGitHubOAuth) NewClient

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

NewClient mocks base method.

func (*MockGitHubOAuth) SetRedirectURL

func (m *MockGitHubOAuth) SetRedirectURL(url 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(state any, opts ...any) *gomock.Call

GetAuthCodeURL indicates an expected call of GetAuthCodeURL.

func (*MockGitHubOAuthMockRecorder) GetUser

func (mr *MockGitHubOAuthMockRecorder) GetUser(client any) *gomock.Call

GetUser indicates an expected call of GetUser.

func (*MockGitHubOAuthMockRecorder) NewClient

func (mr *MockGitHubOAuthMockRecorder) NewClient(oauthCode any) *gomock.Call

NewClient indicates an expected call of NewClient.

func (*MockGitHubOAuthMockRecorder) SetRedirectURL

func (mr *MockGitHubOAuthMockRecorder) SetRedirectURL(url any) *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(id, value any) error

Get mocks base method.

func (*MockObjectCache) Put

func (m *MockObjectCache) Put(id, value any) 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(id, value any) *gomock.Call

Get indicates an expected call of Get.

func (*MockObjectCacheMockRecorder) Put

func (mr *MockObjectCacheMockRecorder) Put(id, value any) *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(id, value any) 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(id, value any) *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 any) (io.ReadCloser, error)

NewReadCloser mocks base method.

func (*MockReadWritable) NewWriteCloser

func (m *MockReadWritable) NewWriteCloser(arg0 any) (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 any) *gomock.Call

NewReadCloser indicates an expected call of NewReadCloser.

func (*MockReadWritableMockRecorder) NewWriteCloser

func (mr *MockReadWritableMockRecorder) NewWriteCloser(arg0 any) *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 any) (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 any) *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(key, value 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(key string) ([]string, error)

GetAll mocks base method.

func (*MockRedisSet) Remove

func (m *MockRedisSet) Remove(key, value 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(key, value any) *gomock.Call

Add indicates an expected call of Add.

func (*MockRedisSetMockRecorder) GetAll

func (mr *MockRedisSetMockRecorder) GetAll(key any) *gomock.Call

GetAll indicates an expected call of GetAll.

func (*MockRedisSetMockRecorder) Remove

func (mr *MockRedisSetMockRecorder) Remove(key, value any) *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(products shared.ProductSpecs, labels mapset.Set, from, to *time.Time, limit, offset *int) ([]string, map[string]shared.KeysByProduct, error)

GetAlignedRunSHAs mocks base method.

func (*MockTestRunQuery) LoadTestRunKeys

func (m *MockTestRunQuery) LoadTestRunKeys(products []shared.ProductSpec, labels mapset.Set, revisions []string, from, to *time.Time, limit, offset *int) (shared.KeysByProduct, error)

LoadTestRunKeys mocks base method.

func (*MockTestRunQuery) LoadTestRuns

func (m *MockTestRunQuery) LoadTestRuns(products []shared.ProductSpec, labels mapset.Set, revisions []string, from, to *time.Time, limit, offset *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(products, labels, from, to, limit, offset any) *gomock.Call

GetAlignedRunSHAs indicates an expected call of GetAlignedRunSHAs.

func (*MockTestRunQueryMockRecorder) LoadTestRunKeys

func (mr *MockTestRunQueryMockRecorder) LoadTestRunKeys(products, labels, revisions, from, to, limit, offset any) *gomock.Call

LoadTestRunKeys indicates an expected call of LoadTestRunKeys.

func (*MockTestRunQueryMockRecorder) LoadTestRuns

func (mr *MockTestRunQueryMockRecorder) LoadTestRuns(products, labels, revisions, from, to, limit, offset any) *gomock.Call

LoadTestRuns indicates an expected call of LoadTestRuns.

func (*MockTestRunQueryMockRecorder) LoadTestRunsByKeys

func (mr *MockTestRunQueryMockRecorder) LoadTestRunsByKeys(arg0 any) *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

func (m *MockTriageMetadata) Triage(metadata shared.MetadataResults) (string, error)

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(metadata any) *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