Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeWithArgs ¶
func InitializeWithArgs(c *gc.C, args InitializeArgs) *state.Controller
InitializeWithArgs initializes the state and returns it. If state was not already initialized, and args.Config is nil, the minimal default model configuration will be used.
func NewMongoInfo ¶
NewMongoInfo returns information suitable for connecting to the testing controller's mongo database.
Types ¶
type InitializeArgs ¶
type InitializeArgs struct {
Owner names.UserTag
AdminPassword string
InitialConfig *config.Config
ControllerConfig map[string]interface{}
ControllerInheritedConfig map[string]interface{}
ControllerModelType state.ModelType
RegionConfig cloud.RegionConfig
NewPolicy state.NewPolicyFunc
Clock clock.Clock
}
type StateSuite ¶
type StateSuite struct {
mgotesting.MgoSuite
testing.BaseSuite
NewPolicy state.NewPolicyFunc
Controller *state.Controller
StatePool *state.StatePool
State *state.State
Model *state.Model
Owner names.UserTag
AdminPassword string
Factory *factory.Factory
InitialConfig *config.Config
ControllerConfig map[string]interface{}
ControllerInheritedConfig map[string]interface{}
ControllerModelType state.ModelType
RegionConfig cloud.RegionConfig
Clock testclock.AdvanceableClock
InstancePrechecker func(*gc.C, *state.State) environs.InstancePrechecker
// contains filtered or unexported fields
}
StateSuite provides setup and teardown for tests that require a state.State.
func (*StateSuite) SetUpSuite ¶
func (s *StateSuite) SetUpSuite(c *gc.C)
func (*StateSuite) SetUpTest ¶
func (s *StateSuite) SetUpTest(c *gc.C)
func (*StateSuite) TearDownSuite ¶
func (s *StateSuite) TearDownSuite(c *gc.C)
func (*StateSuite) TearDownTest ¶
func (s *StateSuite) TearDownTest(c *gc.C)
func (*StateSuite) WaitForModelWatchersIdle ¶
func (s *StateSuite) WaitForModelWatchersIdle(c *gc.C, modelUUID string)
WaitForModelWatchersIdle firstly waits for the txn poller to process all pending changes, then waits for the hub watcher on the state object to have finished processing all those events.
Click to show internal directories.
Click to hide internal directories.