Documentation ¶
Index ¶
- Constants
- type LiveTests
- func (t *LiveTests) BootstrapOnce(c *gc.C)
- func (t *LiveTests) Destroy(c *gc.C)
- func (t *LiveTests) PrepareOnce(c *gc.C)
- func (t *LiveTests) SetUpSuite(c *gc.C)
- func (t *LiveTests) SetUpTest(c *gc.C)
- func (t *LiveTests) TearDownSuite(c *gc.C)
- func (t *LiveTests) TearDownTest(c *gc.C)
- func (t *LiveTests) TestBootstrapAndDeploy(c *gc.C)
- func (t *LiveTests) TestBootstrapMultiple(c *gc.C)
- func (t *LiveTests) TestBootstrapWithDefaultSeries(c *gc.C)
- func (t *LiveTests) TestGlobalPorts(c *gc.C)
- func (t *LiveTests) TestIngressRulesWithPartiallyMatchingCIDRs(c *gc.C)
- func (t *LiveTests) TestPorts(c *gc.C)
- func (t *LiveTests) TestPrechecker(c *gc.C)
- func (t *LiveTests) TestStartInstanceWithEmptyNonceFails(c *gc.C)
- func (t *LiveTests) TestStartStop(c *gc.C)
- type Tests
- func (t *Tests) AssertPrepareFailsWithConfig(c *gc.C, badConfig coretesting.Attrs, errorMatches string) error
- func (t *Tests) CloudSpec() environscloudspec.CloudSpec
- func (t *Tests) Open(c *gc.C, cfg *config.Config) environs.Environ
- func (t *Tests) Prepare(c *gc.C) environs.Environ
- func (t *Tests) PrepareParams(c *gc.C) bootstrap.PrepareParams
- func (t *Tests) PrepareWithParams(c *gc.C, params bootstrap.PrepareParams) environs.Environ
- func (t *Tests) SetUpTest(c *gc.C)
- func (t *Tests) TearDownTest(c *gc.C)
- func (t *Tests) TestBootstrap(c *gc.C)
- func (t *Tests) TestStartStop(c *gc.C)
- Bugs
Constants ¶
const (
AdminSecret = "admin-secret"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LiveTests ¶
type LiveTests struct { gitjujutesting.CleanupSuite envtesting.ToolsFixture sstesting.TestDataSuite // TestConfig contains the configuration attributes for opening an environment. TestConfig coretesting.Attrs // Credential contains the credential for preparing an environment for // bootstrapping. If this is unset, empty credentials will be used. Credential cloud.Credential // CloudRegion contains the cloud region name to create resources in. CloudRegion string // CloudEndpoint contains the cloud API endpoint to communicate with. CloudEndpoint string // Attempt holds a strategy for waiting until the environment // becomes logically consistent. // // TODO(katco): 2016-08-09: lp:1611427 Attempt utils.AttemptStrategy // CanOpenState should be true if the testing environment allows // the state to be opened after bootstrapping. CanOpenState bool // HasProvisioner should be true if the environment has // a provisioning agent. HasProvisioner bool // Env holds the currently opened environment. // This is set by PrepareOnce and BootstrapOnce. Env environs.Environ // ControllerStore holds the controller related information // such as controllers, accounts, etc., used when preparing // the environment. This is initialized by SetUpSuite. ControllerStore jujuclient.ClientStore // ControllerUUID is the uuid of the bootstrapped controller. ControllerUUID string // ProviderCallContext holds the context to be used to make // calls to a cloud provider. ProviderCallContext context.ProviderCallContext // contains filtered or unexported fields }
LiveTests contains tests that are designed to run against a live server (e.g. Amazon EC2). The Environ is opened once only for all the tests in the suite, stored in Env, and Destroyed after the suite has completed.
func (*LiveTests) BootstrapOnce ¶
func (*LiveTests) PrepareOnce ¶
PrepareOnce ensures that the environment is available and prepared. It sets t.Env appropriately.
func (*LiveTests) SetUpSuite ¶
func (*LiveTests) TearDownSuite ¶
func (*LiveTests) TearDownTest ¶
func (*LiveTests) TestBootstrapAndDeploy ¶
func (*LiveTests) TestBootstrapMultiple ¶
func (*LiveTests) TestBootstrapWithDefaultSeries ¶
func (*LiveTests) TestGlobalPorts ¶
func (*LiveTests) TestIngressRulesWithPartiallyMatchingCIDRs ¶
func (*LiveTests) TestPrechecker ¶
func (*LiveTests) TestStartInstanceWithEmptyNonceFails ¶
Check that we get a consistent error when asking for an instance without a valid machine config.
func (*LiveTests) TestStartStop ¶
TestStartStop is similar to Tests.TestStartStop except that it does not assume a pristine environment.
type Tests ¶
type Tests struct { TestConfig coretesting.Attrs Credential cloud.Credential CloudEndpoint string CloudRegion string ControllerUUID string Env environs.Environ envtesting.ToolsFixture sstesting.TestDataSuite // ControllerStore holds the controller related information // such as controllers, accounts, etc., used when preparing // the environment. This is initialized by SetUpSuite. ControllerStore jujuclient.ClientStore // ProviderCallContext holds the context to be used to make // calls to a cloud provider. ProviderCallContext context.ProviderCallContext // contains filtered or unexported fields }
Tests is a gocheck suite containing tests verifying juju functionality against the environment with the given configuration. The tests are not designed to be run against a live server - the Environ is opened once for each test, and some potentially expensive operations may be executed.
func (*Tests) AssertPrepareFailsWithConfig ¶
func (*Tests) CloudSpec ¶
func (t *Tests) CloudSpec() environscloudspec.CloudSpec
func (*Tests) PrepareParams ¶
func (t *Tests) PrepareParams(c *gc.C) bootstrap.PrepareParams
PrepareParams returns the environs.PrepareParams that will be used to call environs.Prepare.
func (*Tests) PrepareWithParams ¶
PrepareWithParams prepares an instance of the testing environment.
func (*Tests) TearDownTest ¶
func (*Tests) TestBootstrap ¶
func (*Tests) TestStartStop ¶
Notes ¶
Bugs ¶
Logic below is very much wrong. Must be:
1. EnsureDying on the unit and EnsureDying on the machine 2. Unit dies by itself 3. Machine removes dead unit 4. Machine dies by itself 5. Provisioner removes dead machine