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

Side by Side Diff: environs/ec2/local_test.go

Issue 6854098: environs/ec2: specify public-bucket-region (Closed)
Patch Set: environs/ec2: specify public-bucket-region Created 5 years, 1 month ago
Left:
Right:
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 unified diff | Download patch
« environs/ec2/config_test.go ('K') | « environs/ec2/ec2.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package ec2_test 1 package ec2_test
2 2
3 import ( 3 import (
4 "launchpad.net/goamz/aws" 4 "launchpad.net/goamz/aws"
5 amzec2 "launchpad.net/goamz/ec2" 5 amzec2 "launchpad.net/goamz/ec2"
6 "launchpad.net/goamz/ec2/ec2test" 6 "launchpad.net/goamz/ec2/ec2test"
7 "launchpad.net/goamz/s3" 7 "launchpad.net/goamz/s3"
8 "launchpad.net/goamz/s3/s3test" 8 "launchpad.net/goamz/s3/s3test"
9 . "launchpad.net/gocheck" 9 . "launchpad.net/gocheck"
10 "launchpad.net/goyaml" 10 "launchpad.net/goyaml"
11 "launchpad.net/juju-core/environs" 11 "launchpad.net/juju-core/environs"
12 "launchpad.net/juju-core/environs/ec2" 12 "launchpad.net/juju-core/environs/ec2"
13 "launchpad.net/juju-core/environs/jujutest" 13 "launchpad.net/juju-core/environs/jujutest"
14 "launchpad.net/juju-core/state" 14 "launchpad.net/juju-core/state"
15 "launchpad.net/juju-core/testing" 15 "launchpad.net/juju-core/testing"
16 "launchpad.net/juju-core/version" 16 "launchpad.net/juju-core/version"
17 "regexp" 17 "regexp"
18 "strings" 18 "strings"
19 ) 19 )
20 20
21 func registerLocalTests() { 21 func registerLocalTests() {
22 // N.B. Make sure the region we use here 22 // N.B. Make sure the region we use here
23 // has entries in the images/query txt files. 23 // has entries in the images/query txt files.
24 aws.Regions["test"] = aws.Region{ 24 aws.Regions["test"] = aws.Region{
25 Name: "test", 25 Name: "test",
26 } 26 }
27 attrs := map[string]interface{}{ 27 attrs := map[string]interface{}{
28 » » "name": "sample", 28 » » "name": "sample",
29 » » "type": "ec2", 29 » » "type": "ec2",
30 » » "region": "test", 30 » » "region": "test",
31 » » "control-bucket": "test-bucket", 31 » » "control-bucket": "test-bucket",
32 » » "public-bucket": "public-tools", 32 » » "public-bucket": "public-tools",
33 » » "admin-secret": "local-secret", 33 » » "public-bucket-region": "test",
niemeyer 2012/11/27 11:40:47 What's the effect of this change? There's nothing
dfc 2012/11/27 11:50:02 This is required. If it is not here then public-bu
34 » » "access-key": "x", 34 » » "admin-secret": "local-secret",
35 » » "secret-key": "x", 35 » » "access-key": "x",
36 » » "authorized-keys": "foo", 36 » » "secret-key": "x",
37 » » "ca-cert": testing.CACertPEM, 37 » » "authorized-keys": "foo",
38 » » "ca-private-key": testing.CAKeyPEM, 38 » » "ca-cert": testing.CACertPEM,
39 » » "ca-private-key": testing.CAKeyPEM,
39 } 40 }
40 41
41 Suite(&localServerSuite{ 42 Suite(&localServerSuite{
42 Tests: jujutest.Tests{ 43 Tests: jujutest.Tests{
43 Config: attrs, 44 Config: attrs,
44 }, 45 },
45 }) 46 })
46 Suite(&localLiveSuite{ 47 Suite(&localLiveSuite{
47 LiveTests: LiveTests{ 48 LiveTests: LiveTests{
48 LiveTests: jujutest.LiveTests{ 49 LiveTests: jujutest.LiveTests{
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 found = true 310 found = true
310 } 311 }
311 } 312 }
312 switch { 313 switch {
313 case match && !found: 314 case match && !found:
314 c.Errorf("package %q not found in %v", pkg, pkgs) 315 c.Errorf("package %q not found in %v", pkg, pkgs)
315 case !match && found: 316 case !match && found:
316 c.Errorf("%q found but not expected in %v", pkg, pkgs) 317 c.Errorf("%q found but not expected in %v", pkg, pkgs)
317 } 318 }
318 } 319 }
OLDNEW
« environs/ec2/config_test.go ('K') | « environs/ec2/ec2.go ('k') | no next file » | no next file with comments »

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