Documentation ¶
Index ¶
Constants ¶
const ( HasSecrets = true NoSecrets = false )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHelper ¶
type BlockHelper struct { ApiState api.Connection // contains filtered or unexported fields }
BlockHelper helps manage blocks for apiserver tests. It provides easy access to switch blocks on as well as test whether operations are blocked or not.
func NewBlockHelper ¶
func NewBlockHelper(st api.Connection) BlockHelper
NewBlockHelper creates a block switch used in testing to manage desired juju blocks.
func (BlockHelper) AssertBlocked ¶
func (s BlockHelper) AssertBlocked(c *gc.C, err error, msg string)
AssertBlocked checks if given error is related to switched block.
func (BlockHelper) BlockAllChanges ¶
func (s BlockHelper) BlockAllChanges(c *gc.C, msg string)
BlockAllChanges blocks all operations that could change environment.
func (BlockHelper) BlockDestroyEnvironment ¶
func (s BlockHelper) BlockDestroyEnvironment(c *gc.C, msg string)
BlockDestroyEnvironment blocks destroy-environment.
func (BlockHelper) BlockRemoveObject ¶
func (s BlockHelper) BlockRemoveObject(c *gc.C, msg string)
BlockRemoveObject blocks all operations that remove machines, services, units or relations.
func (BlockHelper) Close ¶
func (s BlockHelper) Close()
type EnvironWatcherTest ¶
type EnvironWatcherTest struct {
// contains filtered or unexported fields
}
func NewEnvironWatcherTest ¶
func NewEnvironWatcherTest( envWatcher EnvironmentWatcher, st *state.State, resources *common.Resources, hasSecrets bool) *EnvironWatcherTest
func (*EnvironWatcherTest) AssertEnvironConfig ¶
func (s *EnvironWatcherTest) AssertEnvironConfig(c *gc.C, envWatcher EnvironmentWatcher, hasSecrets bool)
AssertEnvironConfig provides a method to test the config from the envWatcher. This allows other tests that embed this type to have more than just the default test.
func (*EnvironWatcherTest) TestEnvironConfig ¶
func (s *EnvironWatcherTest) TestEnvironConfig(c *gc.C)
func (*EnvironWatcherTest) TestWatchForEnvironConfigChanges ¶
func (s *EnvironWatcherTest) TestWatchForEnvironConfigChanges(c *gc.C)
type EnvironmentWatcher ¶
type EnvironmentWatcher interface { WatchForEnvironConfigChanges() (params.NotifyWatchResult, error) EnvironConfig() (params.EnvironConfigResult, error) }