package
0.0.0-20250312133425-17e2192e740d
Repository: https://github.com/web-platform-tests/wpt.fyi.git
Documentation: pkg.go.dev

# 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.

# Functions

MultiRuns returns a DoAndReturn func that puts the given test runs in the dst interface for a shared.Datastore.GetMulti call.
NewAEContext creates a new aetest context backed by dev_appserver whose logs are suppressed.
NewAEInstance creates a new test instance backed by Cloud Datastore emulator.
NewMockAppEngineAPI creates a new mock instance.
NewMockCachedStore creates a new mock instance.
NewMockDatastore creates a new mock instance.
NewMockDiffAPI creates a new mock instance.
NewMockFetchBSF creates a new mock instance.
NewMockGitHubAccessControl creates a new mock instance.
NewMockGitHubOAuth creates a new mock instance.
NewMockMetadataFetcher creates a new mock instance.
NewMockObjectCache creates a new mock instance.
NewMockObjectStore creates a new mock instance.
NewMockReadable creates a new mock instance.
NewMockReadCloser creates a new MockWriteCloser.
NewMockReadWritable creates a new mock instance.
NewMockRedisSet creates a new mock instance.
NewMockTestRunQuery creates a new mock instance.
NewMockTriageMetadata creates a new mock instance.
NewMockWriteCloser creates a new MockWriteCloser.
NewTestContext creates a new context.Context for small tests.
SameDiffFilter returns a gomock matcher for a diff filter.
SameKeys returns a gomock matcher for a Key slice.
SameProductSpec returns a gomock matcher for a product spec.

# Structs

MockAppEngineAPI is a mock of AppEngineAPI interface.
MockAppEngineAPIMockRecorder is the mock recorder for MockAppEngineAPI.
MockCachedStore is a mock of CachedStore interface.
MockCachedStoreMockRecorder is the mock recorder for MockCachedStore.
MockDatastore is a mock of Datastore interface.
MockDatastoreMockRecorder is the mock recorder for MockDatastore.
MockDiffAPI is a mock of DiffAPI interface.
MockDiffAPIMockRecorder is the mock recorder for MockDiffAPI.
MockFetchBSF is a mock of FetchBSF interface.
MockFetchBSFMockRecorder is the mock recorder for MockFetchBSF.
MockGitHubAccessControl is a mock of GitHubAccessControl interface.
MockGitHubAccessControlMockRecorder is the mock recorder for MockGitHubAccessControl.
MockGitHubOAuth is a mock of GitHubOAuth interface.
MockGitHubOAuthMockRecorder is the mock recorder for MockGitHubOAuth.
MockKey is a (very simple) mock shared.Key.MockKey.
MockMetadataFetcher is a mock of MetadataFetcher interface.
MockMetadataFetcherMockRecorder is the mock recorder for MockMetadataFetcher.
MockObjectCache is a mock of ObjectCache interface.
MockObjectCacheMockRecorder is the mock recorder for MockObjectCache.
MockObjectStore is a mock of ObjectStore interface.
MockObjectStoreMockRecorder is the mock recorder for MockObjectStore.
MockReadable is a mock of Readable interface.
MockReadableMockRecorder is the mock recorder for MockReadable.
MockReadCloser is a mock io.ReadCloser for testing.
MockReadWritable is a mock of ReadWritable interface.
MockReadWritableMockRecorder is the mock recorder for MockReadWritable.
MockRedisSet is a mock of RedisSet interface.
MockRedisSetMockRecorder is the mock recorder for MockRedisSet.
MockTestRunQuery is a mock of TestRunQuery interface.
MockTestRunQueryMockRecorder is the mock recorder for MockTestRunQuery.
MockTriageMetadata is a mock of TriageMetadata interface.
MockTriageMetadataMockRecorder is the mock recorder for MockTriageMetadata.
MockWriteCloser is a mock io.WriteCloser for testing.

# Interfaces

Instance represents a running instance of the development API Server.