Documentation
¶
Overview ¶
Package testutils is a generated GoMock package.
Index ¶
- Constants
- Variables
- func CopyContentToExistingTempFile(t *testing.T, content string, file *os.File) *os.File
- func CopyContentToNewTempFile(t *testing.T, content string) *os.File
- func CopyFileToExistingTempFile(t *testing.T, src string, file *os.File) *os.File
- func CopyFileToNewTempFile(t *testing.T, src string) *os.File
- func EncodedMd5Hash(content []byte) string
- func GetFreePort(t *testing.T) int
- func GetFreePortAsString(t *testing.T) string
- func ReplaceAndCopyFileToExistingFile(t *testing.T, src string, dstFile *os.File, old, newStr string) *os.File
- func ReplaceInFile(t *testing.T, file *os.File, old, newStr string)
- type ExportableMockEvent
- type GCStorageReaderMock
- type HTTPClientMock
- type MockedStorage
- type Mockobject
- type MockobjectMockRecorder
- type S3ManagerV2Mock
- func (s *S3ManagerV2Mock) DownloadObject(ctx context.Context, input *transfermanager.DownloadObjectInput, ...) (*transfermanager.DownloadObjectOutput, error)
- func (s *S3ManagerV2Mock) UploadObject(ctx context.Context, uploadInput *transfermanager.UploadObjectInput, ...) (*transfermanager.UploadObjectOutput, error)
Constants ¶
View Source
const RFC3339Regex = "" // nolint:lll /* 161-byte string literal not displayed */
Variables ¶
View Source
var FlagKeyNotStringResult = MissingFlagKeyResult
View Source
var MissingFlagKeyResult = `` /* 216-byte string literal not displayed */
View Source
var MongoFindResultFlagNoStr = `` /* 440-byte string literal not displayed */
View Source
var MongoFindResultString = `` /* 445-byte string literal not displayed */
View Source
var MongoMissingFlagKey = `` /* 425-byte string literal not displayed */
View Source
var QueryResult = `` /* 431-byte string literal not displayed */
Functions ¶
func CopyContentToExistingTempFile ¶ added in v1.50.0
func CopyContentToNewTempFile ¶ added in v1.50.0
func CopyFileToExistingTempFile ¶ added in v1.50.0
func CopyFileToNewTempFile ¶ added in v1.50.0
func EncodedMd5Hash ¶ added in v1.48.0
func GetFreePort ¶ added in v1.50.0
GetFreePort returns a free port on the local machine.
func GetFreePortAsString ¶ added in v1.50.0
GetFreePortAsString returns a free port on the local machine as a string.
func ReplaceAndCopyFileToExistingFile ¶ added in v1.50.0
Types ¶
type ExportableMockEvent ¶ added in v1.44.0
type ExportableMockEvent struct {
// contains filtered or unexported fields
}
func NewExportableMockEvent ¶ added in v1.44.0
func NewExportableMockEvent(name string) ExportableMockEvent
func (ExportableMockEvent) FormatInCSV ¶ added in v1.44.0
func (e ExportableMockEvent) FormatInCSV(_ *template.Template) ([]byte, error)
func (ExportableMockEvent) FormatInJSON ¶ added in v1.44.0
func (e ExportableMockEvent) FormatInJSON() ([]byte, error)
func (ExportableMockEvent) GetCreationDate ¶ added in v1.44.0
func (e ExportableMockEvent) GetCreationDate() int64
func (ExportableMockEvent) GetKey ¶ added in v1.44.0
func (e ExportableMockEvent) GetKey() string
func (ExportableMockEvent) GetUserKey ¶ added in v1.44.0
func (e ExportableMockEvent) GetUserKey() string
type GCStorageReaderMock ¶ added in v0.19.0
type GCStorageReaderMock struct {
ShouldFail bool
FileToRead string
// contains filtered or unexported fields
}
func (*GCStorageReaderMock) Close ¶ added in v0.19.0
func (r *GCStorageReaderMock) Close() error
type HTTPClientMock ¶ added in v0.13.0
type MockedStorage ¶ added in v1.48.0
type MockedStorage struct {
Server *fakestorage.Server
}
func NewMockedGCS ¶ added in v1.48.0
func NewMockedGCS(t *testing.T) MockedStorage
type Mockobject ¶ added in v0.19.0
type Mockobject struct {
// contains filtered or unexported fields
}
Mockobject is a mock of object interface.
func NewMockobject ¶ added in v0.19.0
func NewMockobject(ctrl *gomock.Controller) *Mockobject
NewMockobject creates a new mock instance.
func (*Mockobject) Attrs ¶ added in v0.19.0
func (m *Mockobject) Attrs(ctx context.Context) (*storage.ObjectAttrs, error)
Attrs mocks base method.
func (*Mockobject) EXPECT ¶ added in v0.19.0
func (m *Mockobject) EXPECT() *MockobjectMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockobjectMockRecorder ¶ added in v0.19.0
type MockobjectMockRecorder struct {
// contains filtered or unexported fields
}
MockobjectMockRecorder is the mock recorder for Mockobject.
type S3ManagerV2Mock ¶ added in v1.15.0
func (*S3ManagerV2Mock) DownloadObject ¶ added in v1.51.1
func (s *S3ManagerV2Mock) DownloadObject( ctx context.Context, input *transfermanager.DownloadObjectInput, opts ...func(*transfermanager.Options), ) (*transfermanager.DownloadObjectOutput, error)
func (*S3ManagerV2Mock) UploadObject ¶ added in v1.51.1
func (s *S3ManagerV2Mock) UploadObject( ctx context.Context, uploadInput *transfermanager.UploadObjectInput, opts ...func(*transfermanager.Options), ) (*transfermanager.UploadObjectOutput, error)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
mockretriever
Package mockretriever provides mock implementations of various retriever interfaces for testing purposes in the go-feature-flag project.
|
Package mockretriever provides mock implementations of various retriever interfaces for testing purposes in the go-feature-flag project. |
Click to show internal directories.
Click to hide internal directories.