Documentation
¶
Overview ¶
Package dummy implements an environment provider for testing purposes, registered with environs under the name "dummy".
The configuration data also accepts a "broken" property of type boolean. If this is non-empty, any operation after the environment has been opened will return the error "broken environment", and will also log that.
The DNS name of instances is the same as the Id, with ".dns" appended.
Index ¶
- Constants
- func Listen(c chan<- Operation)
- func SetInstanceAddresses(inst instances.Instance, addrs []network.ProviderAddress)
- func SetInstanceStatus(inst instances.Instance, status string)
- func SetSupportsSpaceDiscovery(supports bool) bool
- func SetSupportsSpaces(supports bool) bool
- type OpBootstrap
- type OpDestroy
- type OpFinalizeBootstrap
- type Operation
Constants ¶
const BootstrapInstanceId = "localhost"
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
func Listen(c chan<- Operation)
Listen directs subsequent operations on any dummy environment to channel c (if not nil).
func SetInstanceAddresses ¶
func SetInstanceAddresses(inst instances.Instance, addrs []network.ProviderAddress)
SetInstanceAddresses sets the addresses associated with the given dummy instance.
func SetInstanceStatus ¶
SetInstanceStatus sets the status associated with the given dummy instance.
func SetSupportsSpaceDiscovery ¶
SetSupportsSpaceDiscovery allows to enable and disable SupportsSpaceDiscovery for tests.
func SetSupportsSpaces ¶
SetSupportsSpaces allows to enable and disable SupportsSpaces for tests.
Types ¶
type OpBootstrap ¶
type OpBootstrap struct { Context environs.BootstrapContext Env string Args environs.BootstrapParams }
type OpFinalizeBootstrap ¶
type OpFinalizeBootstrap struct { Context environs.BootstrapContext Env string InstanceConfig *instancecfg.InstanceConfig }