Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(269)

Unified Diff: environs/maas/environ_test.go

Issue 9738043: cmd/jujud: do not change password
Patch Set: cmd/jujud: do not change password Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « environs/maas/environ.go ('k') | environs/maas/environprovider.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: environs/maas/environ_test.go
=== modified file 'environs/maas/environ_test.go'
--- environs/maas/environ_test.go 2013-06-10 10:30:13 +0000
+++ environs/maas/environ_test.go 2013-06-16 23:07:00 +0000
@@ -15,7 +15,7 @@
envtesting "launchpad.net/juju-core/environs/testing"
"launchpad.net/juju-core/environs/tools"
"launchpad.net/juju-core/errors"
- "launchpad.net/juju-core/state"
+ "launchpad.net/juju-core/instance"
"launchpad.net/juju-core/testing"
"launchpad.net/juju-core/utils"
"launchpad.net/juju-core/version"
@@ -133,7 +133,7 @@
input := `{"system_id": "test"}`
node := suite.testMAASObject.TestServer.NewNode(input)
resourceURI, _ := node.GetField("resource_uri")
- instanceIds := []state.InstanceId{state.InstanceId(resourceURI)}
+ instanceIds := []instance.Id{instance.Id(resourceURI)}
instances, err := suite.environ.Instances(instanceIds)
@@ -146,7 +146,7 @@
// Instances returns nil if the given parameter is empty.
input := `{"system_id": "test"}`
suite.testMAASObject.TestServer.NewNode(input)
- instances, err := suite.environ.Instances([]state.InstanceId{})
+ instances, err := suite.environ.Instances([]instance.Id{})
c.Check(err, IsNil)
c.Check(instances, IsNil)
@@ -187,9 +187,9 @@
resourceURI1, _ := node1.GetField("resource_uri")
input2 := `{"system_id": "test2"}`
suite.testMAASObject.TestServer.NewNode(input2)
- instanceId1 := state.InstanceId(resourceURI1)
- instanceId2 := state.InstanceId("unknown systemID")
- instanceIds := []state.InstanceId{instanceId1, instanceId2}
+ instanceId1 := instance.Id(resourceURI1)
+ instanceId2 := instance.Id("unknown systemID")
+ instanceIds := []instance.Id{instanceId1, instanceId2}
instances, err := suite.environ.Instances(instanceIds)
@@ -344,7 +344,7 @@
func (suite *EnvironSuite) TestStopInstancesReturnsIfParameterEmpty(c *C) {
suite.getInstance("test1")
- err := suite.environ.StopInstances([]environs.Instance{})
+ err := suite.environ.StopInstances([]instance.Instance{})
c.Check(err, IsNil)
operations := suite.testMAASObject.TestServer.NodeOperations()
c.Check(operations, DeepEquals, map[string][]string{})
@@ -354,7 +354,7 @@
instance1 := suite.getInstance("test1")
instance2 := suite.getInstance("test2")
suite.getInstance("test3")
- instances := []environs.Instance{instance1, instance2}
+ instances := []instance.Instance{instance1, instance2}
err := suite.environ.StopInstances(instances)
@@ -369,8 +369,8 @@
hostname := "test"
input := `{"system_id": "system_id", "hostname": "` + hostname + `"}`
node := suite.testMAASObject.TestServer.NewNode(input)
- instance := &maasInstance{&node, suite.environ}
- err := env.saveState(&bootstrapState{StateInstances: []state.InstanceId{instance.Id()}})
+ testInstance := &maasInstance{&node, suite.environ}
+ err := env.saveState(&bootstrapState{StateInstances: []instance.Id{testInstance.Id()}})
c.Assert(err, IsNil)
stateInfo, apiInfo, err := env.StateInfo()
@@ -394,12 +394,12 @@
func (suite *EnvironSuite) TestDestroy(c *C) {
env := suite.makeEnviron()
suite.getInstance("test1")
- instance := suite.getInstance("test2")
+ testInstance := suite.getInstance("test2")
data := makeRandomBytes(10)
suite.testMAASObject.TestServer.NewFile("filename", data)
storage := env.Storage()
- err := env.Destroy([]environs.Instance{instance})
+ err := env.Destroy([]instance.Instance{testInstance})
c.Check(err, IsNil)
// Instances have been stopped.
« no previous file with comments | « environs/maas/environ.go ('k') | environs/maas/environprovider.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b