Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a toolkit for building a new test Environment.
func NewBuilder ¶
func NewBuilder() *Builder
NewBuilder generates a new empty Builder for creating Environments.
func (*Builder) Build ¶
func (b *Builder) Build(ctx context.Context) (Environment, error)
Build is a blocking call to construct the configured Environment and it's underlying Kubernetes cluster. The amount of time that it blocks depends entirely on the underlying clusters.Cluster implementation that was requested.
func (*Builder) WithAddons ¶
WithAddons includes any provided Addon components in the cluster after the cluster is deployed.
type Environment ¶
type Environment interface {
// Name indicates the unique name of the testing environment
Name() string
// Cluster provides access to the testing environment's Kubernetes cluster.
Cluster() clusters.Cluster
// Cleanup performs teardown and cleanup on all cluster components
Cleanup(ctx context.Context) error
// Ready indicates when the environment is ready and fully deployed,
// or if errors occurred during provisioning of components.
Ready(ctx context.Context) ([]runtime.Object, bool, error)
// WaitForReady provides a nonblocking channel which can be used to wait
// for readiness of the Environment. The channel has a timeout that is
// based on the underlying env.Cluster.Type() and if no error is received
// the caller may assume all runtime objects are resolved.
WaitForReady(ctx context.Context) chan error
}
Environment represents a full test environment including components and other aspects of the environment used for testing.
Click to show internal directories.
Click to hide internal directories.