LEFT | RIGHT |
(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 Loading... |
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 Loading... |
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 Loading... |
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 } |
LEFT | RIGHT |