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

Delta Between Two Patch Sets: environs/ec2/config_test.go

Issue 6855054: state: add CACert to Info.
Left Patch Set: state: add RootCertPEM to Info. Created 12 years, 4 months ago
Right Patch Set: state: add CACert to Info. Created 12 years, 4 months 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « environs/dummy/environs_test.go ('k') | environs/ec2/ec2.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 package ec2 1 package ec2
2 2
3 import ( 3 import (
4 "io/ioutil" 4 "io/ioutil"
5 "launchpad.net/goamz/aws" 5 "launchpad.net/goamz/aws"
6 . "launchpad.net/gocheck" 6 . "launchpad.net/gocheck"
7 "launchpad.net/goyaml" 7 "launchpad.net/goyaml"
8 "launchpad.net/juju-core/environs" 8 "launchpad.net/juju-core/environs"
9 "launchpad.net/juju-core/environs/config" 9 "launchpad.net/juju-core/environs/config"
10 "launchpad.net/juju-core/testing" 10 "launchpad.net/juju-core/testing"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 err string 44 err string
45 } 45 }
46 46
47 type attrs map[string]interface{} 47 type attrs map[string]interface{}
48 48
49 func (t configTest) check(c *C) { 49 func (t configTest) check(c *C) {
50 envs := attrs{ 50 envs := attrs{
51 "environments": attrs{ 51 "environments": attrs{
52 "testenv": attrs{ 52 "testenv": attrs{
53 "type": "ec2", 53 "type": "ec2",
54 » » » » "ca-cert": testing.CACertPEM, 54 » » » » "ca-cert": testing.CACert,
55 » » » » "ca-private-key": testing.CAKeyPEM, 55 » » » » "ca-private-key": testing.CAKey,
56 }, 56 },
57 }, 57 },
58 } 58 }
59 testenv := envs["environments"].(attrs)["testenv"].(attrs) 59 testenv := envs["environments"].(attrs)["testenv"].(attrs)
60 for k, v := range t.config { 60 for k, v := range t.config {
61 testenv[k] = v 61 testenv[k] = v
62 } 62 }
63 if _, ok := testenv["control-bucket"]; !ok { 63 if _, ok := testenv["control-bucket"]; !ok {
64 testenv["control-bucket"] = "x" 64 testenv["control-bucket"] = "x"
65 } 65 }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 } 267 }
268 268
269 func (s *ConfigSuite) TestMissingAuth(c *C) { 269 func (s *ConfigSuite) TestMissingAuth(c *C) {
270 os.Setenv("AWS_ACCESS_KEY_ID", "") 270 os.Setenv("AWS_ACCESS_KEY_ID", "")
271 os.Setenv("AWS_SECRET_ACCESS_KEY", "") 271 os.Setenv("AWS_SECRET_ACCESS_KEY", "")
272 test := configTests[0] 272 test := configTests[0]
273 test.err = "environment has no access-key or secret-key" 273 test.err = "environment has no access-key or secret-key"
274 test.check(c) 274 test.check(c)
275 } 275 }
LEFTRIGHT

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