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
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 EncodedMd5Hash ¶
func GetFreePort ¶
GetFreePort returns a free port on the local machine.
func GetFreePortAsString ¶
GetFreePortAsString returns a free port on the local machine as a string.
Types ¶
type ExportableMockEvent ¶
type ExportableMockEvent struct {
// contains filtered or unexported fields
}
func NewExportableMockEvent ¶
func NewExportableMockEvent(name string) ExportableMockEvent
func (ExportableMockEvent) FormatInCSV ¶
func (e ExportableMockEvent) FormatInCSV(_ *template.Template) ([]byte, error)
func (ExportableMockEvent) FormatInJSON ¶
func (e ExportableMockEvent) FormatInJSON() ([]byte, error)
func (ExportableMockEvent) GetCreationDate ¶
func (e ExportableMockEvent) GetCreationDate() int64
func (ExportableMockEvent) GetKey ¶
func (e ExportableMockEvent) GetKey() string
func (ExportableMockEvent) GetUserKey ¶
func (e ExportableMockEvent) GetUserKey() string
type GCStorageReaderMock ¶
type GCStorageReaderMock struct {
ShouldFail bool
FileToRead string
// contains filtered or unexported fields
}
func (*GCStorageReaderMock) Close ¶
func (r *GCStorageReaderMock) Close() error
type HTTPClientMock ¶
type MockedStorage ¶
type MockedStorage struct {
Server *fakestorage.Server
}
func NewMockedGCS ¶
func NewMockedGCS(t *testing.T) MockedStorage
type Mockobject ¶
type Mockobject struct {
// contains filtered or unexported fields
}
Mockobject is a mock of object interface.
func NewMockobject ¶
func NewMockobject(ctrl *gomock.Controller) *Mockobject
NewMockobject creates a new mock instance.
func (*Mockobject) Attrs ¶
func (m *Mockobject) Attrs(ctx context.Context) (*storage.ObjectAttrs, error)
Attrs mocks base method.
func (*Mockobject) EXPECT ¶
func (m *Mockobject) EXPECT() *MockobjectMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockobjectMockRecorder ¶
type MockobjectMockRecorder struct {
// contains filtered or unexported fields
}
MockobjectMockRecorder is the mock recorder for Mockobject.
type S3ManagerV2Mock ¶
func (*S3ManagerV2Mock) Download ¶
func (s *S3ManagerV2Mock) Download( ctx context.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*manager.Downloader), ) (n int64, err error)
func (*S3ManagerV2Mock) Upload ¶
func (s *S3ManagerV2Mock) Upload( ctx context.Context, uploadInput *s3.PutObjectInput, opts ...func(uploader *manager.Uploader), ) (*manager.UploadOutput, 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.