Documentation
¶
Overview ¶
Package test implements helpers for testing.
Index ¶
- func AllocateFreePorts(n int) ([]int, error)
- func NewEntityEventMatcher(action databasev1.Action) gomock.Matcher
- func NewEtcdListenUrls() (string, string, error)
- func NewShardEventMatcher(action databasev1.Action) gomock.Matcher
- func NewSpace() (tempDir string, deferFunc func(), err error)
- func SetupModules(flags []string, units ...run.Unit) func()
- func Space(t *require.Assertions) (tempDir string, deferFunc func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateFreePorts ¶
AllocateFreePorts finds n available ports Copied from https://github.com/tendermint/tendermint/issues/3682
func NewEntityEventMatcher ¶
func NewEntityEventMatcher(action databasev1.Action) gomock.Matcher
NewEntityEventMatcher return a Matcher for comparing entity event's action.
func NewEtcdListenUrls ¶
NewEtcdListenUrls returns two urls with different ports.
func NewShardEventMatcher ¶
func NewShardEventMatcher(action databasev1.Action) gomock.Matcher
NewShardEventMatcher return a Matcher to comparing shard event's action.
func NewSpace ¶
NewSpace create a tmp dir and returns the path and its clear function. It will return any error when failed to create this dir.
func SetupModules ¶ added in v0.3.0
SetupModules wires input modules to build a testing ready runtime.
func Space ¶
func Space(t *require.Assertions) (tempDir string, deferFunc func())
Space create a tmp dir and returns the path and its clear function. It will be panic when encountering some errors.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package flags implements injected flags to run tests.
|
Package flags implements injected flags to run tests. |
Package flow implements mockers for testing flow.
|
Package flow implements mockers for testing flow. |
Package helpers implements several helpers for testing.
|
Package helpers implements several helpers for testing. |
Package measure implements helpers to load schemas for testing.
|
Package measure implements helpers to load schemas for testing. |
Package setup implements a real env in which to run tests.
|
Package setup implements a real env in which to run tests. |
Package stream implements helpers to load schemas for testing.
|
Package stream implements helpers to load schemas for testing. |