LEFT | RIGHT |
1 package ec2_test | 1 package ec2_test |
2 | 2 |
3 import ( | 3 import ( |
4 "crypto/rand" | 4 "crypto/rand" |
5 "fmt" | 5 "fmt" |
6 "io" | 6 "io" |
7 amzec2 "launchpad.net/goamz/ec2" | 7 amzec2 "launchpad.net/goamz/ec2" |
8 . "launchpad.net/gocheck" | 8 . "launchpad.net/gocheck" |
9 "launchpad.net/juju/go/environs" | 9 "launchpad.net/juju/go/environs" |
10 "launchpad.net/juju/go/environs/ec2" | 10 "launchpad.net/juju/go/environs/ec2" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 envs, err := environs.ReadEnvironsBytes([]byte(amazonConfig)) | 43 envs, err := environs.ReadEnvironsBytes([]byte(amazonConfig)) |
44 if err != nil { | 44 if err != nil { |
45 panic(fmt.Errorf("cannot parse amazon tests config data: %v", er
r)) | 45 panic(fmt.Errorf("cannot parse amazon tests config data: %v", er
r)) |
46 } | 46 } |
47 for _, name := range envs.Names() { | 47 for _, name := range envs.Names() { |
48 Suite(&LiveTests{ | 48 Suite(&LiveTests{ |
49 jujutest.LiveTests{ | 49 jujutest.LiveTests{ |
50 Environs: envs, | 50 Environs: envs, |
51 Name: name, | 51 Name: name, |
52 ConsistencyDelay: 5 * time.Second, | 52 ConsistencyDelay: 5 * time.Second, |
53 » » » » CanConnect: true, | 53 » » » » CanOpenState: true, |
54 }, | 54 }, |
55 }) | 55 }) |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 // LiveTests contains tests that can be run against the Amazon servers. | 59 // LiveTests contains tests that can be run against the Amazon servers. |
60 // Each test runs using the same ec2 connection. | 60 // Each test runs using the same ec2 connection. |
61 type LiveTests struct { | 61 type LiveTests struct { |
62 jujutest.LiveTests | 62 jujutest.LiveTests |
63 } | 63 } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 257 } |
258 | 258 |
259 func hasSecurityGroup(r amzec2.Reservation, g amzec2.SecurityGroup) bool { | 259 func hasSecurityGroup(r amzec2.Reservation, g amzec2.SecurityGroup) bool { |
260 for _, rg := range r.SecurityGroups { | 260 for _, rg := range r.SecurityGroups { |
261 if rg.Id == g.Id { | 261 if rg.Id == g.Id { |
262 return true | 262 return true |
263 } | 263 } |
264 } | 264 } |
265 return false | 265 return false |
266 } | 266 } |
LEFT | RIGHT |