testing

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharmSuite

type CharmSuite struct {
	Handler charmstore.HTTPCloseHandler
	Server  *httptest.Server
	Client  *csclient.Client
	// contains filtered or unexported fields
}

CharmSuite provides infrastructure to set up and perform tests associated with charm versioning. A testing charm store server is created and populated with some known charms used for testing.

func (*CharmSuite) AddCharmWithRevision

func (s *CharmSuite) AddCharmWithRevision(c *gc.C, charmName string, rev int) *state.Charm

AddCharmWithRevision adds a charm with the specified revision to state.

func (*CharmSuite) AddMachine

func (s *CharmSuite) AddMachine(c *gc.C, machineId string, job state.MachineJob)

AddMachine adds a new machine to state.

func (*CharmSuite) AddService

func (s *CharmSuite) AddService(c *gc.C, charmName, serviceName string)

AddService adds a service for the specified charm to state.

func (*CharmSuite) AddUnit

func (s *CharmSuite) AddUnit(c *gc.C, serviceName, machineId string)

AddUnit adds a new unit for application to the specified machine.

func (*CharmSuite) SetUnitRevision

func (s *CharmSuite) SetUnitRevision(c *gc.C, unitName string, rev int)

SetUnitRevision sets the unit's charm to the specified revision.

func (*CharmSuite) SetUpSuite

func (s *CharmSuite) SetUpSuite(c *gc.C, jcSuite *jujutesting.JujuConnSuite)

func (*CharmSuite) SetUpTest

func (s *CharmSuite) SetUpTest(c *gc.C)

func (*CharmSuite) SetupScenario

func (s *CharmSuite) SetupScenario(c *gc.C)

SetupScenario adds some machines and services to state. It assumes a controller machine has already been created.

func (*CharmSuite) TearDownSuite

func (s *CharmSuite) TearDownSuite(c *gc.C)

func (*CharmSuite) TearDownTest

func (s *CharmSuite) TearDownTest(c *gc.C)

Jump to

Keyboard shortcuts

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