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

Unified Diff: environs/ec2/live_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/ec2/image_test.go ('k') | environs/ec2/local_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: environs/ec2/live_test.go
=== modified file 'environs/ec2/live_test.go'
--- environs/ec2/live_test.go 2013-05-30 00:47:30 +0000
+++ environs/ec2/live_test.go 2013-06-17 23:00:40 +0000
@@ -17,8 +17,8 @@
"launchpad.net/juju-core/environs/jujutest"
envtesting "launchpad.net/juju-core/environs/testing"
"launchpad.net/juju-core/errors"
+ "launchpad.net/juju-core/instance"
"launchpad.net/juju-core/juju/testing"
- "launchpad.net/juju-core/state"
coretesting "launchpad.net/juju-core/testing"
"strings"
)
@@ -113,13 +113,13 @@
func (t *LiveTests) TestInstanceAttributes(c *C) {
inst := testing.StartInstance(c, t.Env, "30")
- defer t.Env.StopInstances([]environs.Instance{inst})
+ defer t.Env.StopInstances([]instance.Instance{inst})
dns, err := inst.WaitDNSName()
// TODO(niemeyer): This assert sometimes fails with "no instances found"
c.Assert(err, IsNil)
c.Assert(dns, Not(Equals), "")
- insts, err := t.Env.Instances([]state.InstanceId{inst.Id()})
+ insts, err := t.Env.Instances([]instance.Id{inst.Id()})
c.Assert(err, IsNil)
c.Assert(len(insts), Equals, 1)
@@ -130,9 +130,9 @@
func (t *LiveTests) TestStartInstanceConstraints(c *C) {
cons := constraints.MustParse("mem=2G")
- inst, err := t.Env.StartInstance("31", "fake_nonce", config.DefaultSeries, cons, testing.InvalidStateInfo("31"), testing.InvalidAPIInfo("31"))
+ inst, err := t.Env.StartInstance("31", "fake_nonce", config.DefaultSeries, cons, testing.FakeStateInfo("31"), testing.FakeAPIInfo("31"))
c.Assert(err, IsNil)
- defer t.Env.StopInstances([]environs.Instance{inst})
+ defer t.Env.StopInstances([]instance.Instance{inst})
ec2inst := ec2.InstanceEC2(inst)
c.Assert(ec2inst.InstanceType, Equals, "m1.medium")
}
@@ -173,14 +173,14 @@
c.Assert(err, IsNil)
inst0 := testing.StartInstance(c, t.Env, "98")
- defer t.Env.StopInstances([]environs.Instance{inst0})
+ defer t.Env.StopInstances([]instance.Instance{inst0})
// Create a same-named group for the second instance
// before starting it, to check that it's reused correctly.
oldMachineGroup := createGroup(c, ec2conn, groups[2].Name, "old machine group")
inst1 := testing.StartInstance(c, t.Env, "99")
- defer t.Env.StopInstances([]environs.Instance{inst1})
+ defer t.Env.StopInstances([]instance.Instance{inst1})
groupsResp, err := ec2conn.SecurityGroups(groups, nil)
c.Assert(err, IsNil)
@@ -229,7 +229,7 @@
msg := Commentf("reservation %#v", r)
c.Assert(hasSecurityGroup(r, groups[0]), Equals, true, msg)
inst := r.Instances[0]
- switch state.InstanceId(inst.InstanceId) {
+ switch instance.Id(inst.InstanceId) {
case inst0.Id():
c.Assert(hasSecurityGroup(r, groups[1]), Equals, true, msg)
c.Assert(hasSecurityGroup(r, groups[2]), Equals, false, msg)
@@ -314,17 +314,17 @@
inst1 := ec2.FabricateInstance(inst0, "i-aaaaaaaa")
inst2 := testing.StartInstance(c, t.Env, "41")
- err := t.Env.StopInstances([]environs.Instance{inst0, inst1, inst2})
+ err := t.Env.StopInstances([]instance.Instance{inst0, inst1, inst2})
c.Check(err, IsNil)
- var insts []environs.Instance
+ var insts []instance.Instance
// We need the retry logic here because we are waiting
// for Instances to return an error, and it will not retry
// if it succeeds.
gone := false
for a := ec2.ShortAttempt.Start(); a.Next(); {
- insts, err = t.Env.Instances([]state.InstanceId{inst0.Id(), inst2.Id()})
+ insts, err = t.Env.Instances([]instance.Id{inst0.Id(), inst2.Id()})
if err == environs.ErrPartialInstances {
// instances not gone yet.
continue
« no previous file with comments | « environs/ec2/image_test.go ('k') | environs/ec2/local_test.go » ('j') | no next file with comments »

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