Documentation ¶
Index ¶
- type CharmSuite
- func (s *CharmSuite) AddApplication(c *gc.C, charmName, applicationName string)
- func (s *CharmSuite) AddCharmhubCharmWithRevision(c *gc.C, charmName string, rev int) *state.Charm
- func (s *CharmSuite) AddCharmstoreCharmWithRevision(c *gc.C, charmName string, rev int) *state.Charm
- func (s *CharmSuite) AddMachine(c *gc.C, machineId string, job state.MachineJob)
- func (s *CharmSuite) AddUnit(c *gc.C, appName, machineId string)
- func (s *CharmSuite) SetStoreError(name string, err error)
- func (s *CharmSuite) SetUnitRevision(c *gc.C, unitName string, rev int)
- func (s *CharmSuite) SetUpSuite(c *gc.C, jcSuite *jujutesting.JujuConnSuite)
- func (s *CharmSuite) SetUpTest(c *gc.C)
- func (s *CharmSuite) SetupScenario(c *gc.C)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharmSuite ¶
type CharmSuite struct { Store *mockStore // 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) AddApplication ¶
func (s *CharmSuite) AddApplication(c *gc.C, charmName, applicationName string)
AddApplication adds an application for the specified charm to state.
func (*CharmSuite) AddCharmhubCharmWithRevision ¶
AddCharmhubCharmWithRevision adds a charmhub charm with the specified revision to state.
func (*CharmSuite) AddCharmstoreCharmWithRevision ¶
func (s *CharmSuite) AddCharmstoreCharmWithRevision(c *gc.C, charmName string, rev int) *state.Charm
AddCharmWithRevision adds a charmstore 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) AddUnit ¶
func (s *CharmSuite) AddUnit(c *gc.C, appName, machineId string)
AddUnit adds a new unit for application to the specified machine.
func (*CharmSuite) SetStoreError ¶
func (s *CharmSuite) SetStoreError(name string, err error)
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 applications to state. It assumes a controller machine has already been created.