Documentation ¶
Overview ¶
Package testutil contains testing helpers (logging, slow skipping).
Index ¶
- Constants
- func Close(t *testing.T, closer io.Closer)
- func FilterRace(t *testing.T, race RacePolicy)
- func FilterSpeed(t *testing.T, speed Speed)
- func FilterStability(t *testing.T, stability Stability)
- func FilterStabilityAndSpeed(t *testing.T, stability Stability, speed Speed)
- func LogTree(t *testing.T, log string, indent int, title bool, args ...interface{})
- func Logger(t testing.TB) (*zap.Logger, func())
- func LoggerWithRing(t testing.TB) (*zap.Logger, *zapring.Core, func())
- func TestFilterAppMetadata(t *testing.T, events <-chan *protocoltypes.GroupMetadataEvent) []*protocoltypes.AppMetadata
- type PushMockedDispatcher
- func (d *PushMockedDispatcher) BundleID() string
- func (d *PushMockedDispatcher) Debug() string
- func (d *PushMockedDispatcher) Dispatch(data []byte, receiver *protocoltypes.PushServiceReceiver) error
- func (d *PushMockedDispatcher) Len(token []byte) int
- func (d *PushMockedDispatcher) Shift(token []byte) []byte
- func (d *PushMockedDispatcher) TokenType() pushtypes.PushServiceTokenType
- type RacePolicy
- type Speed
- type Stability
Constants ¶
View Source
const ( DummyPushServerAddr = "server.test" PushMockBundleID = "tech.berty.mock" )
Variables ¶
This section is empty.
Functions ¶
func FilterRace ¶
func FilterRace(t *testing.T, race RacePolicy)
func FilterSpeed ¶
func FilterStability ¶
func FilterStabilityAndSpeed ¶
func TestFilterAppMetadata ¶
func TestFilterAppMetadata(t *testing.T, events <-chan *protocoltypes.GroupMetadataEvent) []*protocoltypes.AppMetadata
Types ¶
type PushMockedDispatcher ¶
type PushMockedDispatcher struct {
// contains filtered or unexported fields
}
func NewPushMockedDispatcher ¶
func NewPushMockedDispatcher(bundleID string) *PushMockedDispatcher
func (*PushMockedDispatcher) BundleID ¶
func (d *PushMockedDispatcher) BundleID() string
func (*PushMockedDispatcher) Debug ¶
func (d *PushMockedDispatcher) Debug() string
func (*PushMockedDispatcher) Dispatch ¶
func (d *PushMockedDispatcher) Dispatch(data []byte, receiver *protocoltypes.PushServiceReceiver) error
func (*PushMockedDispatcher) Len ¶
func (d *PushMockedDispatcher) Len(token []byte) int
func (*PushMockedDispatcher) Shift ¶
func (d *PushMockedDispatcher) Shift(token []byte) []byte
func (*PushMockedDispatcher) TokenType ¶
func (d *PushMockedDispatcher) TokenType() pushtypes.PushServiceTokenType
type RacePolicy ¶
type RacePolicy string
RacePolicy enum
const ( SkipIfRace RacePolicy = "skip-if-race" RunIfRace RacePolicy = "run-if-race" )
Click to show internal directories.
Click to hide internal directories.