testing

package
v0.0.0-...-acd7349 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2013 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertStop

func AssertStop(c *C, stopper Stopper)

func SetAgentVersion

func SetAgentVersion(st *state.State, vers version.Number) error

SetAgentVersion sets the current agent version in the state's environment configuration.

Types

type NotifyWatcher

type NotifyWatcher interface {
	Changes() <-chan struct{}
}

type NotifyWatcherC

type NotifyWatcherC struct {
	*C
	State    *state.State
	Watcher  NotifyWatcher
	FullSync bool
}

NotifyWatcherC embeds a gocheck.C and adds methods to help verify the behaviour of any watcher that uses a <-chan struct{}.

func NewLaxNotifyWatcherC

func NewLaxNotifyWatcherC(c *C, st *state.State, w NotifyWatcher) NotifyWatcherC

NewLaxNotifyWatcherC returns a NotifyWatcherC that runs a full watcher sync before reading from the watcher's Changes channel, and hence cannot verify real-world coalescence behaviour.

func NewNotifyWatcherC

func NewNotifyWatcherC(c *C, st *state.State, w NotifyWatcher) NotifyWatcherC

NewNotifyWatcherC returns a NotifyWatcherC that checks for aggressive event coalescence.

func (NotifyWatcherC) AssertClosed

func (c NotifyWatcherC) AssertClosed()

func (NotifyWatcherC) AssertNoChange

func (c NotifyWatcherC) AssertNoChange()

func (NotifyWatcherC) AssertOneChange

func (c NotifyWatcherC) AssertOneChange()

type Stopper

type Stopper interface {
	Stop() error
}

type StringsWatcher

type StringsWatcher interface {
	Stop() error
	Changes() <-chan []string
}

type StringsWatcherC

type StringsWatcherC struct {
	*C
	State    *state.State
	Watcher  StringsWatcher
	FullSync bool
}

StringsWatcherC embeds a gocheck.C and adds methods to help verify the behaviour of any watcher that uses a <-chan []string.

func NewLaxStringsWatcherC

func NewLaxStringsWatcherC(c *C, st *state.State, w StringsWatcher) StringsWatcherC

NewLaxStringsWatcherC returns a StringsWatcherC that runs a full watcher sync before reading from the watcher's Changes channel, and hence cannot verify real-world coalescence behaviour.

func NewStringsWatcherC

func NewStringsWatcherC(c *C, st *state.State, w StringsWatcher) StringsWatcherC

NewStringsWatcherC returns a StringsWatcherC that checks for aggressive event coalescence.

func (StringsWatcherC) AssertClosed

func (c StringsWatcherC) AssertClosed()

func (StringsWatcherC) AssertNoChange

func (c StringsWatcherC) AssertNoChange()

func (StringsWatcherC) AssertOneChange

func (c StringsWatcherC) AssertOneChange(expect ...string)

Jump to

Keyboard shortcuts

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