agenttest

package
v0.0.0-...-a0d7459 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentSuite

type AgentSuite struct {
	testing.JujuConnSuite
	// contains filtered or unexported fields
}

agentSuite is a fixture to be used by agent test suites.

func (*AgentSuite) AssertCanOpenState

func (s *AgentSuite) AssertCanOpenState(c *gc.C, tag names.Tag, dataDir string)

func (*AgentSuite) AssertCannotOpenState

func (s *AgentSuite) AssertCannotOpenState(c *gc.C, tag names.Tag, dataDir string)

func (*AgentSuite) InitAgent

func (s *AgentSuite) InitAgent(c *gc.C, a cmd.Command, args ...string)

InitAgent initialises the given agent command with additional arguments as provided.

func (*AgentSuite) PrimeAgent

func (s *AgentSuite) PrimeAgent(c *gc.C, tag names.Tag, password string) (agent.ConfigSetterWriter, *coretools.Tools)

PrimeAgent writes the configuration file and tools for an agent with the given entity name. It returns the agent's configuration and the current tools.

func (*AgentSuite) PrimeAgentVersion

func (s *AgentSuite) PrimeAgentVersion(c *gc.C, tag names.Tag, password string, vers version.Binary) (agent.ConfigSetterWriter, *coretools.Tools)

PrimeAgentVersion writes the configuration file and tools with version vers for an agent with the given entity name. It returns the agent's configuration and the current tools.

func (*AgentSuite) PrimeStateAgent

func (s *AgentSuite) PrimeStateAgent(c *gc.C, tag names.Tag, password string) (agent.ConfigSetterWriter, *coretools.Tools)

PrimeStateAgent writes the configuration file and tools for a state agent with the given entity name. It returns the agent's configuration and the current tools.

func (*AgentSuite) PrimeStateAgentVersion

func (s *AgentSuite) PrimeStateAgentVersion(c *gc.C, tag names.Tag, password string, vers version.Binary) (
	agent.ConfigSetterWriter, *coretools.Tools,
)

PrimeStateAgentVersion writes the configuration file and tools with version vers for a state agent with the given entity name. It returns the agent's configuration and the current tools.

func (*AgentSuite) WriteStateAgentConfig

func (s *AgentSuite) WriteStateAgentConfig(
	c *gc.C,
	tag names.Tag,
	password string,
	vers version.Binary,
	modelTag names.ModelTag,
) agent.ConfigSetterWriter

WriteStateAgentConfig creates and writes a state agent config.

type FakeEnsureMongo

type FakeEnsureMongo struct {
	EnsureCount      int
	InitiateCount    int
	DataDir          string
	OplogSize        int
	Info             state.StateServingInfo
	InitiateParams   peergrouper.InitiateMongoParams
	Err              error
	ServiceInstalled bool
}

FakeEnsureMongo provides test fakes for the functions used to initialise MongoDB.

func InstallFakeEnsureMongo

func InstallFakeEnsureMongo(suite patchingSuite) *FakeEnsureMongo

InstallFakeEnsureMongo creates a new FakeEnsureMongo, patching out replicaset.CurrentConfig and cmdutil.EnsureMongoServer.

func (*FakeEnsureMongo) CurrentConfig

func (f *FakeEnsureMongo) CurrentConfig(*mgo.Session) (*replicaset.Config, error)

func (*FakeEnsureMongo) EnsureMongo

func (f *FakeEnsureMongo) EnsureMongo(args mongo.EnsureServerParams) error

func (*FakeEnsureMongo) InitiateMongo

func (*FakeEnsureMongo) IsServiceInstalled

func (f *FakeEnsureMongo) IsServiceInstalled() (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL