Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnsupportedEnvironment ¶
func UnsupportedEnvironment(env Environment) error
UnsupportedEnvironment generates an error indicating that the given environment is not supported.
Types ¶
type Context ¶
type Context interface { // TrackResource tracks a resource in this context. If the context is closed, then the resource will be // cleaned up. TrackResource(r Resource) ID // The Environment in which the tests run Environment() Environment // Settings returns common settings Settings() *core.Settings // CreateDirectory creates a new subdirectory within this context. CreateDirectory(name string) (string, error) // CreateTmpDirectory creates a new temporary directory within this context. CreateTmpDirectory(prefix string) (string, error) }
Context is the core context interface that is used by resources.
type Dumper ¶
type Dumper interface {
Dump()
}
Dumper is an interface that is implemented by all components that can dump their state. In CI, it is useful to get as much context as possible when a test fails. Dumper allows dumping of state from a test.
type Environment ¶
type Environment interface { Resource EnvironmentName() environment.Name // Case calls the given function if this environment has the given name. Case(e environment.Name, fn func()) }
Environment is the ambient environment that the test runs in.
type Resetter ¶
type Resetter interface {
Reset() error
}
Resetter is an interface that is implemented by resources that can be reset between executions within contexts.
Click to show internal directories.
Click to hide internal directories.