testhelpers

package
v0.0.0-...-a1e463d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2015 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockUntilSatisfiedOrTimeout

func BlockUntilSatisfiedOrTimeout(condition func() bool, timeout time.Duration) bool

func ResetTestDatabase

func ResetTestDatabase(dbmap *gorp.DbMap)

Types

type LogrusTestHook

type LogrusTestHook struct {
	Logs map[logrus.Level][]*logrus.Entry
}

func NewLogrusTestHook

func NewLogrusTestHook() *LogrusTestHook

func (*LogrusTestHook) ClearLogs

func (h *LogrusTestHook) ClearLogs()

func (*LogrusTestHook) Fire

func (h *LogrusTestHook) Fire(entry *logrus.Entry) error

func (*LogrusTestHook) HasMessage

func (h *LogrusTestHook) HasMessage(level logrus.Level, message string) bool

func (*LogrusTestHook) Levels

func (h *LogrusTestHook) Levels() []logrus.Level

type NotificationSubscriberCombo

type NotificationSubscriberCombo struct {
	Notifications []backend.Notification
	Subscriber    backend.Subscriber
}

type TestNotifier

type TestNotifier struct {
	*sync.Mutex
	Logs []*NotificationSubscriberCombo
}

func NewTestNotifier

func NewTestNotifier() *TestNotifier

func (*TestNotifier) Name

func (n *TestNotifier) Name() string

func (*TestNotifier) Send

func (n *TestNotifier) Send(notifications []backend.Notification, subscriber backend.Subscriber) error

func (*TestNotifier) ShouldSendImmediately

func (n *TestNotifier) ShouldSendImmediately() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL