LEFT | RIGHT |
1 package jujutest | 1 package jujutest |
2 | 2 |
3 import ( | 3 import ( |
4 . "launchpad.net/gocheck" | 4 . "launchpad.net/gocheck" |
5 "launchpad.net/juju/go/environs" | 5 "launchpad.net/juju/go/environs" |
6 "launchpad.net/juju/go/state" | 6 "launchpad.net/juju/go/state" |
7 "time" | 7 "time" |
8 ) | 8 ) |
9 | 9 |
10 // InvalidStateInfo holds information about no state - it will always give | 10 // InvalidStateInfo holds information about no state - it will always give |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // (e.g. Amazon EC2). The Environ is opened once only for all the tests | 51 // (e.g. Amazon EC2). The Environ is opened once only for all the tests |
52 // in the suite, stored in Env, and Destroyed after the suite has completed. | 52 // in the suite, stored in Env, and Destroyed after the suite has completed. |
53 type LiveTests struct { | 53 type LiveTests struct { |
54 Environs *environs.Environs | 54 Environs *environs.Environs |
55 Name string | 55 Name string |
56 Env environs.Environ | 56 Env environs.Environ |
57 // ConsistencyDelay gives the length of time to wait before | 57 // ConsistencyDelay gives the length of time to wait before |
58 // environ becomes logically consistent. | 58 // environ becomes logically consistent. |
59 ConsistencyDelay time.Duration | 59 ConsistencyDelay time.Duration |
60 | 60 |
61 » // CanConnect should be true if the testing environment allows | 61 » // CanOpenState should be true if the testing environment allows |
62 » // connection to the state after bootstrapping. | 62 » // the state to be opened after bootstrapping. |
63 » CanConnect bool | 63 » CanOpenState bool |
64 bootstrapped bool | 64 bootstrapped bool |
65 } | 65 } |
66 | 66 |
67 func (t *LiveTests) SetUpSuite(c *C) { | 67 func (t *LiveTests) SetUpSuite(c *C) { |
68 e, err := t.Environs.Open(t.Name) | 68 e, err := t.Environs.Open(t.Name) |
69 c.Assert(err, IsNil, Commentf("opening environ %q", t.Name)) | 69 c.Assert(err, IsNil, Commentf("opening environ %q", t.Name)) |
70 c.Assert(e, NotNil) | 70 c.Assert(e, NotNil) |
71 t.Env = e | 71 t.Env = e |
72 } | 72 } |
73 | 73 |
(...skipping 16 matching lines...) Expand all Loading... |
90 err := t.Env.Destroy(nil) | 90 err := t.Env.Destroy(nil) |
91 c.Check(err, IsNil) | 91 c.Check(err, IsNil) |
92 t.Env = nil | 92 t.Env = nil |
93 } | 93 } |
94 | 94 |
95 func (t *LiveTests) SetUpTest(*C) { | 95 func (t *LiveTests) SetUpTest(*C) { |
96 } | 96 } |
97 | 97 |
98 func (t *LiveTests) TearDownTest(*C) { | 98 func (t *LiveTests) TearDownTest(*C) { |
99 } | 99 } |
LEFT | RIGHT |