~rogpeppe/juju-core/323-machineagent-api-client

« back to all changes in this revision

Viewing changes to environs/ec2/live_test.go

  • Committer: Tarmac
  • Author(s): Tim Penhey
  • Date: 2013-06-17 22:06:54 UTC
  • mfrom: (1274.3.10 instance-id)
  • Revision ID: tarmac-20130617220654-1d7y34f00629h8cv
[r=thumper] Move state.InstanceId to instance.Id

Very mechanical change, just imports, and occasional variable renames.

https://codereview.appspot.com/10325043/

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
        "launchpad.net/juju-core/errors"
20
20
        "launchpad.net/juju-core/instance"
21
21
        "launchpad.net/juju-core/juju/testing"
22
 
        "launchpad.net/juju-core/state"
23
22
        coretesting "launchpad.net/juju-core/testing"
24
23
        "strings"
25
24
)
120
119
        c.Assert(err, IsNil)
121
120
        c.Assert(dns, Not(Equals), "")
122
121
 
123
 
        insts, err := t.Env.Instances([]state.InstanceId{inst.Id()})
 
122
        insts, err := t.Env.Instances([]instance.Id{inst.Id()})
124
123
        c.Assert(err, IsNil)
125
124
        c.Assert(len(insts), Equals, 1)
126
125
 
230
229
                msg := Commentf("reservation %#v", r)
231
230
                c.Assert(hasSecurityGroup(r, groups[0]), Equals, true, msg)
232
231
                inst := r.Instances[0]
233
 
                switch state.InstanceId(inst.InstanceId) {
 
232
                switch instance.Id(inst.InstanceId) {
234
233
                case inst0.Id():
235
234
                        c.Assert(hasSecurityGroup(r, groups[1]), Equals, true, msg)
236
235
                        c.Assert(hasSecurityGroup(r, groups[2]), Equals, false, msg)
325
324
        // if it succeeds.
326
325
        gone := false
327
326
        for a := ec2.ShortAttempt.Start(); a.Next(); {
328
 
                insts, err = t.Env.Instances([]state.InstanceId{inst0.Id(), inst2.Id()})
 
327
                insts, err = t.Env.Instances([]instance.Id{inst0.Id(), inst2.Id()})
329
328
                if err == environs.ErrPartialInstances {
330
329
                        // instances not gone yet.
331
330
                        continue