LEFT | RIGHT |
1 package ec2_test | 1 package ec2_test |
2 | 2 |
3 import ( | 3 import ( |
4 "fmt" | 4 "fmt" |
5 "launchpad.net/goamz/aws" | 5 "launchpad.net/goamz/aws" |
6 amzec2 "launchpad.net/goamz/ec2" | 6 amzec2 "launchpad.net/goamz/ec2" |
7 "launchpad.net/goamz/ec2/ec2test" | 7 "launchpad.net/goamz/ec2/ec2test" |
8 "launchpad.net/goamz/s3" | 8 "launchpad.net/goamz/s3" |
9 "launchpad.net/goamz/s3/s3test" | 9 "launchpad.net/goamz/s3/s3test" |
10 . "launchpad.net/gocheck" | 10 . "launchpad.net/gocheck" |
11 "launchpad.net/goyaml" | 11 "launchpad.net/goyaml" |
12 "launchpad.net/juju-core/environs" | 12 "launchpad.net/juju-core/environs" |
13 "launchpad.net/juju-core/environs/config" | 13 "launchpad.net/juju-core/environs/config" |
14 "launchpad.net/juju-core/environs/ec2" | 14 "launchpad.net/juju-core/environs/ec2" |
15 "launchpad.net/juju-core/environs/jujutest" | 15 "launchpad.net/juju-core/environs/jujutest" |
16 "launchpad.net/juju-core/state" | 16 "launchpad.net/juju-core/state" |
17 "launchpad.net/juju-core/testing" | 17 "launchpad.net/juju-core/testing" |
18 "launchpad.net/juju-core/version" | 18 "launchpad.net/juju-core/version" |
19 "regexp" | 19 "regexp" |
20 "strings" | 20 "strings" |
21 ) | 21 ) |
22 | 22 |
23 func registerLocalTests() { | 23 func registerLocalTests() { |
| 24 // N.B. Make sure the region we use here |
| 25 // has entries in the images/query txt files. |
24 aws.Regions["test"] = aws.Region{ | 26 aws.Regions["test"] = aws.Region{ |
25 Name: "test", | 27 Name: "test", |
26 } | 28 } |
27 // N.B. Make sure the region we use here | |
28 // has entries in the images/query txt files. | |
29 cfg, err := config.New(map[string]interface{}{ | 29 cfg, err := config.New(map[string]interface{}{ |
30 "name": "sample", | 30 "name": "sample", |
31 "type": "ec2", | 31 "type": "ec2", |
32 "region": "test", | 32 "region": "test", |
33 "control-bucket": "test-bucket", | 33 "control-bucket": "test-bucket", |
34 "public-bucket": "public-tools", | 34 "public-bucket": "public-tools", |
35 "admin-secret": "local-secret", | 35 "admin-secret": "local-secret", |
36 "access-key": "x", | 36 "access-key": "x", |
37 "secret-key": "x", | 37 "secret-key": "x", |
38 }) | 38 }) |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 found = true | 311 found = true |
312 } | 312 } |
313 } | 313 } |
314 switch { | 314 switch { |
315 case match && !found: | 315 case match && !found: |
316 c.Errorf("package %q not found in %v", pkg, pkgs) | 316 c.Errorf("package %q not found in %v", pkg, pkgs) |
317 case !match && found: | 317 case !match && found: |
318 c.Errorf("%q found but not expected in %v", pkg, pkgs) | 318 c.Errorf("%q found but not expected in %v", pkg, pkgs) |
319 } | 319 } |
320 } | 320 } |
LEFT | RIGHT |