Left: | ||
Right: |
OLD | NEW |
---|---|
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 "io/ioutil" | 7 "io/ioutil" |
8 amzec2 "launchpad.net/goamz/ec2" | 8 amzec2 "launchpad.net/goamz/ec2" |
9 . "launchpad.net/gocheck" | 9 . "launchpad.net/gocheck" |
10 "launchpad.net/juju-core/environs" | 10 "launchpad.net/juju-core/environs" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 } | 29 } |
30 | 30 |
31 func registerAmazonTests() { | 31 func registerAmazonTests() { |
32 // The following attributes hold the environment configuration | 32 // The following attributes hold the environment configuration |
33 // for running the amazon EC2 integration tests. | 33 // for running the amazon EC2 integration tests. |
34 // | 34 // |
35 // This is missing keys for security reasons; set the following | 35 // This is missing keys for security reasons; set the following |
36 // environment variables to make the Amazon testing work: | 36 // environment variables to make the Amazon testing work: |
37 // access-key: $AWS_ACCESS_KEY_ID | 37 // access-key: $AWS_ACCESS_KEY_ID |
38 // secret-key: $AWS_SECRET_ACCESS_KEY | 38 // secret-key: $AWS_SECRET_ACCESS_KEY |
39 // | |
40 // default-series must not be specified, hence defaulting to the | |
41 // series of the machine running the tests. This behavior is | |
42 // required because --upload-tools will not create tools for | |
43 // other series'. | |
rog
2012/11/21 10:27:05
s/'//
dave_cheney.net
2012/11/21 11:42:48
Done.
| |
39 attrs := map[string]interface{}{ | 44 attrs := map[string]interface{}{ |
40 "name": "sample-" + uniqueName, | 45 "name": "sample-" + uniqueName, |
41 "type": "ec2", | 46 "type": "ec2", |
42 "control-bucket": "juju-test-" + uniqueName, | 47 "control-bucket": "juju-test-" + uniqueName, |
43 "public-bucket": "juju-public-test-" + uniqueName, | 48 "public-bucket": "juju-public-test-" + uniqueName, |
44 "admin-secret": "for real", | 49 "admin-secret": "for real", |
45 } | 50 } |
46 Suite(&LiveTests{ | 51 Suite(&LiveTests{ |
47 LiveTests: jujutest.LiveTests{ | 52 LiveTests: jujutest.LiveTests{ |
48 Config: attrs, | 53 Config: attrs, |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 } | 392 } |
388 | 393 |
389 func hasSecurityGroup(r amzec2.Reservation, g amzec2.SecurityGroup) bool { | 394 func hasSecurityGroup(r amzec2.Reservation, g amzec2.SecurityGroup) bool { |
390 for _, rg := range r.SecurityGroups { | 395 for _, rg := range r.SecurityGroups { |
391 if rg.Id == g.Id { | 396 if rg.Id == g.Id { |
392 return true | 397 return true |
393 } | 398 } |
394 } | 399 } |
395 return false | 400 return false |
396 } | 401 } |
OLD | NEW |