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

Delta Between Two Patch Sets: environs/ec2/local_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:
Right: Side by side diff | Download
« no previous file with change/comment | « environs/ec2/live_test.go ('k') | environs/interface.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
(no file at all)
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"
(...skipping 16 matching lines...) Expand all
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 "admin-secret": "local-secret",
34 "access-key": "x", 34 "access-key": "x",
35 "secret-key": "x", 35 "secret-key": "x",
36 "authorized-keys": "foo", 36 "authorized-keys": "foo",
37 » » "ca-cert": testing.CACertPEM, 37 » » "ca-cert": testing.CACert,
38 » » "ca-private-key": testing.CAKeyPEM, 38 » » "ca-private-key": testing.CAKey,
39 } 39 }
40 40
41 Suite(&localServerSuite{ 41 Suite(&localServerSuite{
42 Tests: jujutest.Tests{ 42 Tests: jujutest.Tests{
43 Config: attrs, 43 Config: attrs,
44 }, 44 },
45 }) 45 })
46 Suite(&localLiveSuite{ 46 Suite(&localLiveSuite{
47 LiveTests: LiveTests{ 47 LiveTests: LiveTests{
48 LiveTests: jujutest.LiveTests{ 48 LiveTests: jujutest.LiveTests{
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 func (t *localServerSuite) TearDownTest(c *C) { 189 func (t *localServerSuite) TearDownTest(c *C) {
190 t.Tests.TearDownTest(c) 190 t.Tests.TearDownTest(c)
191 t.srv.stopServer(c) 191 t.srv.stopServer(c)
192 t.LoggingSuite.TearDownTest(c) 192 t.LoggingSuite.TearDownTest(c)
193 } 193 }
194 194
195 func (t *localServerSuite) TestBootstrapInstanceUserDataAndState(c *C) { 195 func (t *localServerSuite) TestBootstrapInstanceUserDataAndState(c *C) {
196 policy := t.env.AssignmentPolicy() 196 policy := t.env.AssignmentPolicy()
197 c.Assert(policy, Equals, state.AssignUnused) 197 c.Assert(policy, Equals, state.AssignUnused)
198 198
199 » err := environs.Bootstrap(t.env, true, []byte(testing.CACertPEM+testing. CAKeyPEM)) 199 » err := environs.Bootstrap(t.env, true, []byte(testing.CACert+testing.CAK ey))
200 c.Assert(err, IsNil) 200 c.Assert(err, IsNil)
201 201
202 // check that the state holds the id of the bootstrap machine. 202 // check that the state holds the id of the bootstrap machine.
203 state, err := ec2.LoadState(t.env) 203 state, err := ec2.LoadState(t.env)
204 c.Assert(err, IsNil) 204 c.Assert(err, IsNil)
205 c.Assert(state.StateInstances, HasLen, 1) 205 c.Assert(state.StateInstances, HasLen, 1)
206 206
207 insts, err := t.env.Instances(state.StateInstances) 207 insts, err := t.env.Instances(state.StateInstances)
208 c.Assert(err, IsNil) 208 c.Assert(err, IsNil)
209 c.Assert(insts, HasLen, 1) 209 c.Assert(insts, HasLen, 1)
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 found = true 309 found = true
310 } 310 }
311 } 311 }
312 switch { 312 switch {
313 case match && !found: 313 case match && !found:
314 c.Errorf("package %q not found in %v", pkg, pkgs) 314 c.Errorf("package %q not found in %v", pkg, pkgs)
315 case !match && found: 315 case !match && found:
316 c.Errorf("%q found but not expected in %v", pkg, pkgs) 316 c.Errorf("%q found but not expected in %v", pkg, pkgs)
317 } 317 }
318 } 318 }
LEFTRIGHT

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