Merge lp:~thumper/juju-core/testbase into lp:~go-bot/juju-core/trunk
- testbase
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1848 |
Proposed branch: | lp:~thumper/juju-core/testbase |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
2097 lines (+251/-174) 91 files modified
agent/agent_test.go (+2/-2) agent/format-1.12_whitebox_test.go (+2/-2) agent/format-1.16_whitebox_test.go (+2/-2) agent/format_whitebox_test.go (+2/-2) agent/tools/diskmanager_test.go (+2/-1) agent/tools/tools_test.go (+3/-2) charm/dir_test.go (+2/-1) charm/repo_test.go (+4/-3) cmd/juju/bootstrap_test.go (+2/-1) cmd/juju/plugin_test.go (+2/-1) cmd/juju/publish_test.go (+2/-1) cmd/juju/synctools_test.go (+2/-1) cmd/jujud/agent_test.go (+2/-1) cmd/jujud/bootstrap_test.go (+2/-1) cmd/jujud/machine_test.go (+2/-1) cmd/logging_test.go (+3/-2) container/lxc/lxc_test.go (+3/-2) downloader/downloader_test.go (+2/-1) environs/bootstrap/bootstrap_test.go (+2/-1) environs/cert_internal_test.go (+2/-1) environs/cert_test.go (+2/-1) environs/cloudinit/cloudinit_test.go (+2/-1) environs/cloudinit_test.go (+2/-1) environs/config/config_test.go (+2/-1) environs/httpstorage/backend_test.go (+2/-2) environs/imagemetadata/validation_test.go (+2/-1) environs/instances/image_test.go (+2/-10) environs/instances/instancetype_test.go (+2/-10) environs/jujutest/livetests.go (+2/-1) environs/jujutest/tests.go (+2/-1) environs/manual/detection_test.go (+3/-3) environs/mongo_test.go (+2/-1) environs/simplestreams/testing/testing.go (+2/-2) environs/sshstorage/storage_test.go (+5/-5) environs/sync/sync_test.go (+3/-2) environs/tools/build_test.go (+2/-2) environs/tools/storage_test.go (+2/-2) environs/tools/tools_test.go (+2/-2) environs/tools/validation_test.go (+2/-1) instance/address_test.go (+2/-2) juju/apiconn_test.go (+16/-15) juju/conn_test.go (+3/-2) juju/osenv/package_test.go (+2/-2) juju/osenv/vars_linux_test.go (+2/-2) juju/osenv/vars_windows_test.go (+2/-2) juju/testing/conn.go (+3/-2) provider/azure/azure_test.go (+2/-2) provider/azure/config_test.go (+2/-1) provider/azure/customdata_test.go (+2/-1) provider/ec2/config_test.go (+2/-1) provider/ec2/image_test.go (+3/-3) provider/ec2/live_test.go (+2/-1) provider/ec2/local_test.go (+2/-1) provider/local/environprovider_test.go (+2/-1) provider/local/local_test.go (+2/-2) provider/local/prereqs_test.go (+2/-2) provider/maas/config_test.go (+2/-1) provider/maas/maas_test.go (+2/-2) provider/openstack/config_test.go (+2/-1) provider/openstack/live_test.go (+2/-1) provider/openstack/local_test.go (+3/-2) provider/state_test.go (+2/-1) rpc/jsoncodec/codec_test.go (+2/-2) rpc/rpc_test.go (+2/-2) state/apiserver/common/errors_test.go (+2/-2) state/conn_test.go (+2/-1) state/initialize_test.go (+2/-1) state/megawatcher_internal_test.go (+2/-1) state/multiwatcher/multiwatcher_internal_test.go (+3/-3) state/presence/presence_test.go (+2/-1) state/settings_test.go (+2/-1) state/watcher/watcher_test.go (+2/-1) store/store_test.go (+2/-1) testing/mgo_test.go (+2/-1) testing/testbase/cleanup.go (+1/-1) testing/testbase/cleanup_test.go (+6/-3) testing/testbase/imports.go (+1/-1) testing/testbase/log.go (+1/-1) testing/testbase/log_test.go (+6/-3) testing/testbase/package_test.go (+26/-0) testing/testbase/patch.go (+4/-1) testing/testbase/patch_test.go (+11/-8) utils/fslock/fslock_test.go (+2/-1) worker/deployer/simple_test.go (+2/-1) worker/notifyworker_test.go (+2/-1) worker/provisioner/lxc-broker_test.go (+2/-1) worker/runner_test.go (+2/-2) worker/stringsworker_test.go (+2/-1) worker/uniter/charm/git_test.go (+2/-1) worker/uniter/debug/server_test.go (+2/-2) worker/uniter/jujuc/server_test.go (+2/-1) |
To merge this branch: | bzr merge lp:~thumper/juju-core/testbase |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+186701@code.launchpad.net |
Commit message
Add a testbase package with no juju-core deps.
The base cleanup and logging suites are now there,
as are the patch functions.
A test also exists there to make sure that no juju-core
dependencies creep in.
Description of the change
Add a testbase package with no juju-core deps.
The base cleanup and logging suites are now there,
as are the patch functions.
A test also exists there to make sure that no juju-core
dependencies creep in.
Tim Penhey (thumper) wrote : | # |
Andrew Wilkins (axwalk) wrote : | # |
LGTM, just one question about dependencies.
https:/
File testing/
https:/
testing/
bring in any juju-core dependencies.
Glad to have this here. Is it okay for testbase to import
testing/checkers?
Preview Diff
1 | === modified file 'agent/agent_test.go' | |||
2 | --- agent/agent_test.go 2013-08-22 21:27:08 +0000 | |||
3 | +++ agent/agent_test.go 2013-09-20 02:56:01 +0000 | |||
4 | @@ -7,11 +7,11 @@ | |||
5 | 7 | gc "launchpad.net/gocheck" | 7 | gc "launchpad.net/gocheck" |
6 | 8 | 8 | ||
7 | 9 | "launchpad.net/juju-core/agent" | 9 | "launchpad.net/juju-core/agent" |
9 | 10 | coretesting "launchpad.net/juju-core/testing" | 10 | "launchpad.net/juju-core/testing/testbase" |
10 | 11 | ) | 11 | ) |
11 | 12 | 12 | ||
12 | 13 | type suite struct { | 13 | type suite struct { |
14 | 14 | coretesting.LoggingSuite | 14 | testbase.LoggingSuite |
15 | 15 | } | 15 | } |
16 | 16 | 16 | ||
17 | 17 | var _ = gc.Suite(&suite{}) | 17 | var _ = gc.Suite(&suite{}) |
18 | 18 | 18 | ||
19 | === modified file 'agent/format-1.12_whitebox_test.go' | |||
20 | --- agent/format-1.12_whitebox_test.go 2013-09-02 04:08:52 +0000 | |||
21 | +++ agent/format-1.12_whitebox_test.go 2013-09-20 02:56:01 +0000 | |||
22 | @@ -9,12 +9,12 @@ | |||
23 | 9 | 9 | ||
24 | 10 | gc "launchpad.net/gocheck" | 10 | gc "launchpad.net/gocheck" |
25 | 11 | 11 | ||
26 | 12 | "launchpad.net/juju-core/testing" | ||
27 | 13 | jc "launchpad.net/juju-core/testing/checkers" | 12 | jc "launchpad.net/juju-core/testing/checkers" |
28 | 13 | "launchpad.net/juju-core/testing/testbase" | ||
29 | 14 | ) | 14 | ) |
30 | 15 | 15 | ||
31 | 16 | type format_1_12Suite struct { | 16 | type format_1_12Suite struct { |
33 | 17 | testing.LoggingSuite | 17 | testbase.LoggingSuite |
34 | 18 | formatter formatter_1_12 | 18 | formatter formatter_1_12 |
35 | 19 | } | 19 | } |
36 | 20 | 20 | ||
37 | 21 | 21 | ||
38 | === modified file 'agent/format-1.16_whitebox_test.go' | |||
39 | --- agent/format-1.16_whitebox_test.go 2013-09-19 02:17:33 +0000 | |||
40 | +++ agent/format-1.16_whitebox_test.go 2013-09-20 02:56:01 +0000 | |||
41 | @@ -14,12 +14,12 @@ | |||
42 | 14 | gc "launchpad.net/gocheck" | 14 | gc "launchpad.net/gocheck" |
43 | 15 | 15 | ||
44 | 16 | "launchpad.net/juju-core/juju/osenv" | 16 | "launchpad.net/juju-core/juju/osenv" |
45 | 17 | "launchpad.net/juju-core/testing" | ||
46 | 18 | jc "launchpad.net/juju-core/testing/checkers" | 17 | jc "launchpad.net/juju-core/testing/checkers" |
47 | 18 | "launchpad.net/juju-core/testing/testbase" | ||
48 | 19 | ) | 19 | ) |
49 | 20 | 20 | ||
50 | 21 | type format_1_16Suite struct { | 21 | type format_1_16Suite struct { |
52 | 22 | testing.LoggingSuite | 22 | testbase.LoggingSuite |
53 | 23 | formatter formatter_1_16 | 23 | formatter formatter_1_16 |
54 | 24 | } | 24 | } |
55 | 25 | 25 | ||
56 | 26 | 26 | ||
57 | === modified file 'agent/format_whitebox_test.go' | |||
58 | --- agent/format_whitebox_test.go 2013-09-02 04:08:52 +0000 | |||
59 | +++ agent/format_whitebox_test.go 2013-09-20 02:56:01 +0000 | |||
60 | @@ -9,11 +9,11 @@ | |||
61 | 9 | 9 | ||
62 | 10 | gc "launchpad.net/gocheck" | 10 | gc "launchpad.net/gocheck" |
63 | 11 | 11 | ||
65 | 12 | "launchpad.net/juju-core/testing" | 12 | "launchpad.net/juju-core/testing/testbase" |
66 | 13 | ) | 13 | ) |
67 | 14 | 14 | ||
68 | 15 | type formatSuite struct { | 15 | type formatSuite struct { |
70 | 16 | testing.LoggingSuite | 16 | testbase.LoggingSuite |
71 | 17 | } | 17 | } |
72 | 18 | 18 | ||
73 | 19 | var _ = gc.Suite(&formatSuite{}) | 19 | var _ = gc.Suite(&formatSuite{}) |
74 | 20 | 20 | ||
75 | === modified file 'agent/tools/diskmanager_test.go' | |||
76 | --- agent/tools/diskmanager_test.go 2013-08-22 21:59:32 +0000 | |||
77 | +++ agent/tools/diskmanager_test.go 2013-09-20 02:56:01 +0000 | |||
78 | @@ -11,6 +11,7 @@ | |||
79 | 11 | 11 | ||
80 | 12 | agenttools "launchpad.net/juju-core/agent/tools" | 12 | agenttools "launchpad.net/juju-core/agent/tools" |
81 | 13 | coretesting "launchpad.net/juju-core/testing" | 13 | coretesting "launchpad.net/juju-core/testing" |
82 | 14 | "launchpad.net/juju-core/testing/testbase" | ||
83 | 14 | coretools "launchpad.net/juju-core/tools" | 15 | coretools "launchpad.net/juju-core/tools" |
84 | 15 | "launchpad.net/juju-core/version" | 16 | "launchpad.net/juju-core/version" |
85 | 16 | ) | 17 | ) |
86 | @@ -20,7 +21,7 @@ | |||
87 | 20 | var _ agenttools.ToolsManager = (*agenttools.DiskManager)(nil) | 21 | var _ agenttools.ToolsManager = (*agenttools.DiskManager)(nil) |
88 | 21 | 22 | ||
89 | 22 | type DiskManagerSuite struct { | 23 | type DiskManagerSuite struct { |
91 | 23 | coretesting.LoggingSuite | 24 | testbase.LoggingSuite |
92 | 24 | dataDir string | 25 | dataDir string |
93 | 25 | manager agenttools.ToolsManager | 26 | manager agenttools.ToolsManager |
94 | 26 | } | 27 | } |
95 | 27 | 28 | ||
96 | === modified file 'agent/tools/tools_test.go' | |||
97 | --- agent/tools/tools_test.go 2013-08-22 21:59:32 +0000 | |||
98 | +++ agent/tools/tools_test.go 2013-09-20 02:56:01 +0000 | |||
99 | @@ -14,12 +14,13 @@ | |||
100 | 14 | 14 | ||
101 | 15 | agenttools "launchpad.net/juju-core/agent/tools" | 15 | agenttools "launchpad.net/juju-core/agent/tools" |
102 | 16 | "launchpad.net/juju-core/testing" | 16 | "launchpad.net/juju-core/testing" |
103 | 17 | "launchpad.net/juju-core/testing/testbase" | ||
104 | 17 | coretest "launchpad.net/juju-core/tools" | 18 | coretest "launchpad.net/juju-core/tools" |
105 | 18 | "launchpad.net/juju-core/version" | 19 | "launchpad.net/juju-core/version" |
106 | 19 | ) | 20 | ) |
107 | 20 | 21 | ||
108 | 21 | type ToolsSuite struct { | 22 | type ToolsSuite struct { |
110 | 22 | testing.LoggingSuite | 23 | testbase.LoggingSuite |
111 | 23 | dataDir string | 24 | dataDir string |
112 | 24 | } | 25 | } |
113 | 25 | 26 | ||
114 | @@ -35,7 +36,7 @@ | |||
115 | 35 | // or any of the other bigger packages that'll drag in yet more dependencies. | 36 | // or any of the other bigger packages that'll drag in yet more dependencies. |
116 | 36 | // Only imports that start with "launchpad.net/juju-core" are checked, and the | 37 | // Only imports that start with "launchpad.net/juju-core" are checked, and the |
117 | 37 | // resulting slice has that prefix removed to keep the output short. | 38 | // resulting slice has that prefix removed to keep the output short. |
119 | 38 | c.Assert(testing.FindJujuCoreImports(c, "launchpad.net/juju-core/agent/tools"), | 39 | c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/agent/tools"), |
120 | 39 | gc.DeepEquals, | 40 | gc.DeepEquals, |
121 | 40 | []string{"tools", "version"}) | 41 | []string{"tools", "version"}) |
122 | 41 | } | 42 | } |
123 | 42 | 43 | ||
124 | === modified file 'charm/dir_test.go' | |||
125 | --- charm/dir_test.go 2013-08-19 11:17:19 +0000 | |||
126 | +++ charm/dir_test.go 2013-09-20 02:56:01 +0000 | |||
127 | @@ -17,10 +17,11 @@ | |||
128 | 17 | 17 | ||
129 | 18 | "launchpad.net/juju-core/charm" | 18 | "launchpad.net/juju-core/charm" |
130 | 19 | "launchpad.net/juju-core/testing" | 19 | "launchpad.net/juju-core/testing" |
131 | 20 | "launchpad.net/juju-core/testing/testbase" | ||
132 | 20 | ) | 21 | ) |
133 | 21 | 22 | ||
134 | 22 | type DirSuite struct { | 23 | type DirSuite struct { |
136 | 23 | testing.LoggingSuite | 24 | testbase.LoggingSuite |
137 | 24 | } | 25 | } |
138 | 25 | 26 | ||
139 | 26 | var _ = gc.Suite(&DirSuite{}) | 27 | var _ = gc.Suite(&DirSuite{}) |
140 | 27 | 28 | ||
141 | === modified file 'charm/repo_test.go' | |||
142 | --- charm/repo_test.go 2013-08-19 11:17:19 +0000 | |||
143 | +++ charm/repo_test.go 2013-09-20 02:56:01 +0000 | |||
144 | @@ -20,6 +20,7 @@ | |||
145 | 20 | 20 | ||
146 | 21 | "launchpad.net/juju-core/charm" | 21 | "launchpad.net/juju-core/charm" |
147 | 22 | "launchpad.net/juju-core/testing" | 22 | "launchpad.net/juju-core/testing" |
148 | 23 | "launchpad.net/juju-core/testing/testbase" | ||
149 | 23 | ) | 24 | ) |
150 | 24 | 25 | ||
151 | 25 | type MockStore struct { | 26 | type MockStore struct { |
152 | @@ -151,7 +152,7 @@ | |||
153 | 151 | } | 152 | } |
154 | 152 | 153 | ||
155 | 153 | type StoreSuite struct { | 154 | type StoreSuite struct { |
157 | 154 | testing.LoggingSuite | 155 | testbase.LoggingSuite |
158 | 155 | server *MockStore | 156 | server *MockStore |
159 | 156 | store *charm.CharmStore | 157 | store *charm.CharmStore |
160 | 157 | oldCacheDir string | 158 | oldCacheDir string |
161 | @@ -172,7 +173,7 @@ | |||
162 | 172 | s.server.downloads = nil | 173 | s.server.downloads = nil |
163 | 173 | } | 174 | } |
164 | 174 | 175 | ||
166 | 175 | // Uses the TearDownTest from testing.LoggingSuite | 176 | // Uses the TearDownTest from testbase.LoggingSuite |
167 | 176 | 177 | ||
168 | 177 | func (s *StoreSuite) TearDownSuite(c *gc.C) { | 178 | func (s *StoreSuite) TearDownSuite(c *gc.C) { |
169 | 178 | charm.CacheDir = s.oldCacheDir | 179 | charm.CacheDir = s.oldCacheDir |
170 | @@ -392,7 +393,7 @@ | |||
171 | 392 | } | 393 | } |
172 | 393 | 394 | ||
173 | 394 | type LocalRepoSuite struct { | 395 | type LocalRepoSuite struct { |
175 | 395 | testing.LoggingSuite | 396 | testbase.LoggingSuite |
176 | 396 | repo *charm.LocalRepository | 397 | repo *charm.LocalRepository |
177 | 397 | seriesPath string | 398 | seriesPath string |
178 | 398 | } | 399 | } |
179 | 399 | 400 | ||
180 | === modified file 'cmd/juju/bootstrap_test.go' | |||
181 | --- cmd/juju/bootstrap_test.go 2013-09-20 00:52:13 +0000 | |||
182 | +++ cmd/juju/bootstrap_test.go 2013-09-20 02:56:01 +0000 | |||
183 | @@ -23,12 +23,13 @@ | |||
184 | 23 | "launchpad.net/juju-core/errors" | 23 | "launchpad.net/juju-core/errors" |
185 | 24 | "launchpad.net/juju-core/provider/dummy" | 24 | "launchpad.net/juju-core/provider/dummy" |
186 | 25 | coretesting "launchpad.net/juju-core/testing" | 25 | coretesting "launchpad.net/juju-core/testing" |
187 | 26 | "launchpad.net/juju-core/testing/testbase" | ||
188 | 26 | coretools "launchpad.net/juju-core/tools" | 27 | coretools "launchpad.net/juju-core/tools" |
189 | 27 | "launchpad.net/juju-core/version" | 28 | "launchpad.net/juju-core/version" |
190 | 28 | ) | 29 | ) |
191 | 29 | 30 | ||
192 | 30 | type BootstrapSuite struct { | 31 | type BootstrapSuite struct { |
194 | 31 | coretesting.LoggingSuite | 32 | testbase.LoggingSuite |
195 | 32 | coretesting.MgoSuite | 33 | coretesting.MgoSuite |
196 | 33 | envtesting.ToolsFixture | 34 | envtesting.ToolsFixture |
197 | 34 | } | 35 | } |
198 | 35 | 36 | ||
199 | === modified file 'cmd/juju/plugin_test.go' | |||
200 | --- cmd/juju/plugin_test.go 2013-09-13 14:48:13 +0000 | |||
201 | +++ cmd/juju/plugin_test.go 2013-09-20 02:56:01 +0000 | |||
202 | @@ -15,10 +15,11 @@ | |||
203 | 15 | 15 | ||
204 | 16 | "launchpad.net/juju-core/testing" | 16 | "launchpad.net/juju-core/testing" |
205 | 17 | jc "launchpad.net/juju-core/testing/checkers" | 17 | jc "launchpad.net/juju-core/testing/checkers" |
206 | 18 | "launchpad.net/juju-core/testing/testbase" | ||
207 | 18 | ) | 19 | ) |
208 | 19 | 20 | ||
209 | 20 | type PluginSuite struct { | 21 | type PluginSuite struct { |
211 | 21 | testing.LoggingSuite | 22 | testbase.LoggingSuite |
212 | 22 | oldPath string | 23 | oldPath string |
213 | 23 | home *testing.FakeHome | 24 | home *testing.FakeHome |
214 | 24 | } | 25 | } |
215 | 25 | 26 | ||
216 | === modified file 'cmd/juju/publish_test.go' | |||
217 | --- cmd/juju/publish_test.go 2013-09-13 14:48:13 +0000 | |||
218 | +++ cmd/juju/publish_test.go 2013-09-20 02:56:01 +0000 | |||
219 | @@ -13,12 +13,13 @@ | |||
220 | 13 | "launchpad.net/juju-core/charm" | 13 | "launchpad.net/juju-core/charm" |
221 | 14 | "launchpad.net/juju-core/cmd" | 14 | "launchpad.net/juju-core/cmd" |
222 | 15 | "launchpad.net/juju-core/testing" | 15 | "launchpad.net/juju-core/testing" |
223 | 16 | "launchpad.net/juju-core/testing/testbase" | ||
224 | 16 | ) | 17 | ) |
225 | 17 | 18 | ||
226 | 18 | // Sadly, this is a very slow test suite, heavily dominated by calls to bzr. | 19 | // Sadly, this is a very slow test suite, heavily dominated by calls to bzr. |
227 | 19 | 20 | ||
228 | 20 | type PublishSuite struct { | 21 | type PublishSuite struct { |
230 | 21 | testing.LoggingSuite | 22 | testbase.LoggingSuite |
231 | 22 | testing.HTTPSuite | 23 | testing.HTTPSuite |
232 | 23 | 24 | ||
233 | 24 | home *testing.FakeHome | 25 | home *testing.FakeHome |
234 | 25 | 26 | ||
235 | === modified file 'cmd/juju/synctools_test.go' | |||
236 | --- cmd/juju/synctools_test.go 2013-09-13 04:16:42 +0000 | |||
237 | +++ cmd/juju/synctools_test.go 2013-09-20 02:56:01 +0000 | |||
238 | @@ -15,10 +15,11 @@ | |||
239 | 15 | "launchpad.net/juju-core/provider/dummy" | 15 | "launchpad.net/juju-core/provider/dummy" |
240 | 16 | coretesting "launchpad.net/juju-core/testing" | 16 | coretesting "launchpad.net/juju-core/testing" |
241 | 17 | jc "launchpad.net/juju-core/testing/checkers" | 17 | jc "launchpad.net/juju-core/testing/checkers" |
242 | 18 | "launchpad.net/juju-core/testing/testbase" | ||
243 | 18 | ) | 19 | ) |
244 | 19 | 20 | ||
245 | 20 | type syncToolsSuite struct { | 21 | type syncToolsSuite struct { |
247 | 21 | coretesting.LoggingSuite | 22 | testbase.LoggingSuite |
248 | 22 | home *coretesting.FakeHome | 23 | home *coretesting.FakeHome |
249 | 23 | targetEnv environs.Environ | 24 | targetEnv environs.Environ |
250 | 24 | localStorage string | 25 | localStorage string |
251 | 25 | 26 | ||
252 | === modified file 'cmd/jujud/agent_test.go' | |||
253 | --- cmd/jujud/agent_test.go 2013-09-18 22:54:32 +0000 | |||
254 | +++ cmd/jujud/agent_test.go 2013-09-20 02:56:01 +0000 | |||
255 | @@ -23,6 +23,7 @@ | |||
256 | 23 | "launchpad.net/juju-core/state/api/params" | 23 | "launchpad.net/juju-core/state/api/params" |
257 | 24 | coretesting "launchpad.net/juju-core/testing" | 24 | coretesting "launchpad.net/juju-core/testing" |
258 | 25 | jc "launchpad.net/juju-core/testing/checkers" | 25 | jc "launchpad.net/juju-core/testing/checkers" |
259 | 26 | "launchpad.net/juju-core/testing/testbase" | ||
260 | 26 | coretools "launchpad.net/juju-core/tools" | 27 | coretools "launchpad.net/juju-core/tools" |
261 | 27 | "launchpad.net/juju-core/version" | 28 | "launchpad.net/juju-core/version" |
262 | 28 | "launchpad.net/juju-core/worker" | 29 | "launchpad.net/juju-core/worker" |
263 | @@ -32,7 +33,7 @@ | |||
264 | 32 | var _ = gc.Suite(&toolSuite{}) | 33 | var _ = gc.Suite(&toolSuite{}) |
265 | 33 | 34 | ||
266 | 34 | type toolSuite struct { | 35 | type toolSuite struct { |
268 | 35 | coretesting.LoggingSuite | 36 | testbase.LoggingSuite |
269 | 36 | } | 37 | } |
270 | 37 | 38 | ||
271 | 38 | var errorImportanceTests = []error{ | 39 | var errorImportanceTests = []error{ |
272 | 39 | 40 | ||
273 | === modified file 'cmd/jujud/bootstrap_test.go' | |||
274 | --- cmd/jujud/bootstrap_test.go 2013-09-12 12:38:04 +0000 | |||
275 | +++ cmd/jujud/bootstrap_test.go 2013-09-20 02:56:01 +0000 | |||
276 | @@ -20,13 +20,14 @@ | |||
277 | 20 | "launchpad.net/juju-core/provider/dummy" | 20 | "launchpad.net/juju-core/provider/dummy" |
278 | 21 | "launchpad.net/juju-core/state" | 21 | "launchpad.net/juju-core/state" |
279 | 22 | "launchpad.net/juju-core/testing" | 22 | "launchpad.net/juju-core/testing" |
280 | 23 | "launchpad.net/juju-core/testing/testbase" | ||
281 | 23 | "launchpad.net/juju-core/utils" | 24 | "launchpad.net/juju-core/utils" |
282 | 24 | ) | 25 | ) |
283 | 25 | 26 | ||
284 | 26 | // We don't want to use JujuConnSuite because it gives us | 27 | // We don't want to use JujuConnSuite because it gives us |
285 | 27 | // an already-bootstrapped environment. | 28 | // an already-bootstrapped environment. |
286 | 28 | type BootstrapSuite struct { | 29 | type BootstrapSuite struct { |
288 | 29 | testing.LoggingSuite | 30 | testbase.LoggingSuite |
289 | 30 | testing.MgoSuite | 31 | testing.MgoSuite |
290 | 31 | dataDir string | 32 | dataDir string |
291 | 32 | providerStateURLFile string | 33 | providerStateURLFile string |
292 | 33 | 34 | ||
293 | === modified file 'cmd/jujud/machine_test.go' | |||
294 | --- cmd/jujud/machine_test.go 2013-09-19 14:48:05 +0000 | |||
295 | +++ cmd/jujud/machine_test.go 2013-09-20 02:56:01 +0000 | |||
296 | @@ -25,6 +25,7 @@ | |||
297 | 25 | "launchpad.net/juju-core/state/watcher" | 25 | "launchpad.net/juju-core/state/watcher" |
298 | 26 | "launchpad.net/juju-core/testing" | 26 | "launchpad.net/juju-core/testing" |
299 | 27 | jc "launchpad.net/juju-core/testing/checkers" | 27 | jc "launchpad.net/juju-core/testing/checkers" |
300 | 28 | "launchpad.net/juju-core/testing/testbase" | ||
301 | 28 | "launchpad.net/juju-core/tools" | 29 | "launchpad.net/juju-core/tools" |
302 | 29 | "launchpad.net/juju-core/version" | 30 | "launchpad.net/juju-core/version" |
303 | 30 | "launchpad.net/juju-core/worker/deployer" | 31 | "launchpad.net/juju-core/worker/deployer" |
304 | @@ -40,7 +41,7 @@ | |||
305 | 40 | func (s *MachineSuite) SetUpSuite(c *gc.C) { | 41 | func (s *MachineSuite) SetUpSuite(c *gc.C) { |
306 | 41 | s.agentSuite.SetUpSuite(c) | 42 | s.agentSuite.SetUpSuite(c) |
307 | 42 | s.TestSuite.SetUpSuite(c) | 43 | s.TestSuite.SetUpSuite(c) |
309 | 43 | restore := testing.PatchValue(&charm.CacheDir, c.MkDir()) | 44 | restore := testbase.PatchValue(&charm.CacheDir, c.MkDir()) |
310 | 44 | s.AddSuiteCleanup(func(*gc.C) { restore() }) | 45 | s.AddSuiteCleanup(func(*gc.C) { restore() }) |
311 | 45 | } | 46 | } |
312 | 46 | 47 | ||
313 | 47 | 48 | ||
314 | === modified file 'cmd/logging_test.go' | |||
315 | --- cmd/logging_test.go 2013-09-19 02:17:33 +0000 | |||
316 | +++ cmd/logging_test.go 2013-09-20 02:56:01 +0000 | |||
317 | @@ -13,12 +13,13 @@ | |||
318 | 13 | "launchpad.net/juju-core/cmd" | 13 | "launchpad.net/juju-core/cmd" |
319 | 14 | "launchpad.net/juju-core/juju/osenv" | 14 | "launchpad.net/juju-core/juju/osenv" |
320 | 15 | "launchpad.net/juju-core/testing" | 15 | "launchpad.net/juju-core/testing" |
321 | 16 | "launchpad.net/juju-core/testing/testbase" | ||
322 | 16 | ) | 17 | ) |
323 | 17 | 18 | ||
324 | 18 | var logger = loggo.GetLogger("juju.test") | 19 | var logger = loggo.GetLogger("juju.test") |
325 | 19 | 20 | ||
326 | 20 | type LogSuite struct { | 21 | type LogSuite struct { |
328 | 21 | testing.CleanupSuite | 22 | testbase.CleanupSuite |
329 | 22 | } | 23 | } |
330 | 23 | 24 | ||
331 | 24 | var _ = gc.Suite(&LogSuite{}) | 25 | var _ = gc.Suite(&LogSuite{}) |
332 | @@ -59,7 +60,7 @@ | |||
333 | 59 | 60 | ||
334 | 60 | func (s *LogSuite) TestLogConfigFromEnvironment(c *gc.C) { | 61 | func (s *LogSuite) TestLogConfigFromEnvironment(c *gc.C) { |
335 | 61 | config := "juju.cmd=INFO;juju.worker.deployer=DEBUG" | 62 | config := "juju.cmd=INFO;juju.worker.deployer=DEBUG" |
337 | 62 | testing.PatchEnvironment(osenv.JujuLoggingConfig, config) | 63 | testbase.PatchEnvironment(osenv.JujuLoggingConfig, config) |
338 | 63 | log := newLogWithFlags(c, []string{}) | 64 | log := newLogWithFlags(c, []string{}) |
339 | 64 | c.Assert(log.Path, gc.Equals, "") | 65 | c.Assert(log.Path, gc.Equals, "") |
340 | 65 | c.Assert(log.Verbose, gc.Equals, false) | 66 | c.Assert(log.Verbose, gc.Equals, false) |
341 | 66 | 67 | ||
342 | === modified file 'container/lxc/lxc_test.go' | |||
343 | --- container/lxc/lxc_test.go 2013-09-19 03:23:04 +0000 | |||
344 | +++ container/lxc/lxc_test.go 2013-09-20 02:56:01 +0000 | |||
345 | @@ -21,6 +21,7 @@ | |||
346 | 21 | jujutesting "launchpad.net/juju-core/juju/testing" | 21 | jujutesting "launchpad.net/juju-core/juju/testing" |
347 | 22 | "launchpad.net/juju-core/testing" | 22 | "launchpad.net/juju-core/testing" |
348 | 23 | jc "launchpad.net/juju-core/testing/checkers" | 23 | jc "launchpad.net/juju-core/testing/checkers" |
349 | 24 | "launchpad.net/juju-core/testing/testbase" | ||
350 | 24 | "launchpad.net/juju-core/tools" | 25 | "launchpad.net/juju-core/tools" |
351 | 25 | "launchpad.net/juju-core/version" | 26 | "launchpad.net/juju-core/version" |
352 | 26 | ) | 27 | ) |
353 | @@ -30,7 +31,7 @@ | |||
354 | 30 | } | 31 | } |
355 | 31 | 32 | ||
356 | 32 | type LxcSuite struct { | 33 | type LxcSuite struct { |
358 | 33 | testing.LoggingSuite | 34 | testbase.LoggingSuite |
359 | 34 | lxc.TestSuite | 35 | lxc.TestSuite |
360 | 35 | oldPath string | 36 | oldPath string |
361 | 36 | } | 37 | } |
362 | @@ -217,7 +218,7 @@ | |||
363 | 217 | } | 218 | } |
364 | 218 | 219 | ||
365 | 219 | type NetworkSuite struct { | 220 | type NetworkSuite struct { |
367 | 220 | testing.LoggingSuite | 221 | testbase.LoggingSuite |
368 | 221 | } | 222 | } |
369 | 222 | 223 | ||
370 | 223 | var _ = gc.Suite(&NetworkSuite{}) | 224 | var _ = gc.Suite(&NetworkSuite{}) |
371 | 224 | 225 | ||
372 | === modified file 'downloader/downloader_test.go' | |||
373 | --- downloader/downloader_test.go 2013-08-19 11:17:19 +0000 | |||
374 | +++ downloader/downloader_test.go 2013-09-20 02:56:01 +0000 | |||
375 | @@ -14,10 +14,11 @@ | |||
376 | 14 | 14 | ||
377 | 15 | "launchpad.net/juju-core/downloader" | 15 | "launchpad.net/juju-core/downloader" |
378 | 16 | "launchpad.net/juju-core/testing" | 16 | "launchpad.net/juju-core/testing" |
379 | 17 | "launchpad.net/juju-core/testing/testbase" | ||
380 | 17 | ) | 18 | ) |
381 | 18 | 19 | ||
382 | 19 | type suite struct { | 20 | type suite struct { |
384 | 20 | testing.LoggingSuite | 21 | testbase.LoggingSuite |
385 | 21 | testing.HTTPSuite | 22 | testing.HTTPSuite |
386 | 22 | } | 23 | } |
387 | 23 | 24 | ||
388 | 24 | 25 | ||
389 | === modified file 'environs/bootstrap/bootstrap_test.go' | |||
390 | --- environs/bootstrap/bootstrap_test.go 2013-09-19 00:22:15 +0000 | |||
391 | +++ environs/bootstrap/bootstrap_test.go 2013-09-20 02:56:01 +0000 | |||
392 | @@ -17,6 +17,7 @@ | |||
393 | 17 | envtesting "launchpad.net/juju-core/environs/testing" | 17 | envtesting "launchpad.net/juju-core/environs/testing" |
394 | 18 | "launchpad.net/juju-core/provider/dummy" | 18 | "launchpad.net/juju-core/provider/dummy" |
395 | 19 | coretesting "launchpad.net/juju-core/testing" | 19 | coretesting "launchpad.net/juju-core/testing" |
396 | 20 | "launchpad.net/juju-core/testing/testbase" | ||
397 | 20 | "launchpad.net/juju-core/tools" | 21 | "launchpad.net/juju-core/tools" |
398 | 21 | "launchpad.net/juju-core/version" | 22 | "launchpad.net/juju-core/version" |
399 | 22 | ) | 23 | ) |
400 | @@ -32,7 +33,7 @@ | |||
401 | 32 | 33 | ||
402 | 33 | type bootstrapSuite struct { | 34 | type bootstrapSuite struct { |
403 | 34 | home *coretesting.FakeHome | 35 | home *coretesting.FakeHome |
405 | 35 | coretesting.LoggingSuite | 36 | testbase.LoggingSuite |
406 | 36 | envtesting.ToolsFixture | 37 | envtesting.ToolsFixture |
407 | 37 | } | 38 | } |
408 | 38 | 39 | ||
409 | 39 | 40 | ||
410 | === modified file 'environs/cert_internal_test.go' | |||
411 | --- environs/cert_internal_test.go 2013-08-19 16:10:25 +0000 | |||
412 | +++ environs/cert_internal_test.go 2013-09-20 02:56:01 +0000 | |||
413 | @@ -8,11 +8,12 @@ | |||
414 | 8 | 8 | ||
415 | 9 | "launchpad.net/juju-core/cert" | 9 | "launchpad.net/juju-core/cert" |
416 | 10 | "launchpad.net/juju-core/testing" | 10 | "launchpad.net/juju-core/testing" |
417 | 11 | "launchpad.net/juju-core/testing/testbase" | ||
418 | 11 | ) | 12 | ) |
419 | 12 | 13 | ||
420 | 13 | // EnvironsCertSuite tests the internal functions defined in environs/cert.go | 14 | // EnvironsCertSuite tests the internal functions defined in environs/cert.go |
421 | 14 | type EnvironsCertSuite struct { | 15 | type EnvironsCertSuite struct { |
423 | 15 | testing.LoggingSuite | 16 | testbase.LoggingSuite |
424 | 16 | } | 17 | } |
425 | 17 | 18 | ||
426 | 18 | var _ = gc.Suite(&EnvironsCertSuite{}) | 19 | var _ = gc.Suite(&EnvironsCertSuite{}) |
427 | 19 | 20 | ||
428 | === modified file 'environs/cert_test.go' | |||
429 | --- environs/cert_test.go 2013-08-19 16:11:44 +0000 | |||
430 | +++ environs/cert_test.go 2013-09-20 02:56:01 +0000 | |||
431 | @@ -11,10 +11,11 @@ | |||
432 | 11 | "launchpad.net/juju-core/environs" | 11 | "launchpad.net/juju-core/environs" |
433 | 12 | "launchpad.net/juju-core/environs/config" | 12 | "launchpad.net/juju-core/environs/config" |
434 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing" |
435 | 14 | "launchpad.net/juju-core/testing/testbase" | ||
436 | 14 | ) | 15 | ) |
437 | 15 | 16 | ||
438 | 16 | type EnvironsCertSuite struct { | 17 | type EnvironsCertSuite struct { |
440 | 17 | testing.LoggingSuite | 18 | testbase.LoggingSuite |
441 | 18 | } | 19 | } |
442 | 19 | 20 | ||
443 | 20 | var _ = gc.Suite(&EnvironsCertSuite{}) | 21 | var _ = gc.Suite(&EnvironsCertSuite{}) |
444 | 21 | 22 | ||
445 | === modified file 'environs/cloudinit/cloudinit_test.go' | |||
446 | --- environs/cloudinit/cloudinit_test.go 2013-09-16 23:06:44 +0000 | |||
447 | +++ environs/cloudinit/cloudinit_test.go 2013-09-20 02:56:01 +0000 | |||
448 | @@ -20,6 +20,7 @@ | |||
449 | 20 | "launchpad.net/juju-core/state" | 20 | "launchpad.net/juju-core/state" |
450 | 21 | "launchpad.net/juju-core/state/api" | 21 | "launchpad.net/juju-core/state/api" |
451 | 22 | "launchpad.net/juju-core/testing" | 22 | "launchpad.net/juju-core/testing" |
452 | 23 | "launchpad.net/juju-core/testing/testbase" | ||
453 | 23 | "launchpad.net/juju-core/tools" | 24 | "launchpad.net/juju-core/tools" |
454 | 24 | "launchpad.net/juju-core/version" | 25 | "launchpad.net/juju-core/version" |
455 | 25 | ) | 26 | ) |
456 | @@ -27,7 +28,7 @@ | |||
457 | 27 | // Use local suite since this file lives in the ec2 package | 28 | // Use local suite since this file lives in the ec2 package |
458 | 28 | // for testing internals. | 29 | // for testing internals. |
459 | 29 | type cloudinitSuite struct { | 30 | type cloudinitSuite struct { |
461 | 30 | testing.LoggingSuite | 31 | testbase.LoggingSuite |
462 | 31 | } | 32 | } |
463 | 32 | 33 | ||
464 | 33 | var _ = gc.Suite(&cloudinitSuite{}) | 34 | var _ = gc.Suite(&cloudinitSuite{}) |
465 | 34 | 35 | ||
466 | === modified file 'environs/cloudinit_test.go' | |||
467 | --- environs/cloudinit_test.go 2013-09-12 21:32:12 +0000 | |||
468 | +++ environs/cloudinit_test.go 2013-09-20 02:56:01 +0000 | |||
469 | @@ -19,6 +19,7 @@ | |||
470 | 19 | "launchpad.net/juju-core/state" | 19 | "launchpad.net/juju-core/state" |
471 | 20 | "launchpad.net/juju-core/state/api" | 20 | "launchpad.net/juju-core/state/api" |
472 | 21 | "launchpad.net/juju-core/testing" | 21 | "launchpad.net/juju-core/testing" |
473 | 22 | "launchpad.net/juju-core/testing/testbase" | ||
474 | 22 | "launchpad.net/juju-core/tools" | 23 | "launchpad.net/juju-core/tools" |
475 | 23 | "launchpad.net/juju-core/utils" | 24 | "launchpad.net/juju-core/utils" |
476 | 24 | "launchpad.net/juju-core/version" | 25 | "launchpad.net/juju-core/version" |
477 | @@ -34,7 +35,7 @@ | |||
478 | 34 | } | 35 | } |
479 | 35 | 36 | ||
480 | 36 | type CloudInitSuite struct { | 37 | type CloudInitSuite struct { |
482 | 37 | testing.LoggingSuite | 38 | testbase.LoggingSuite |
483 | 38 | } | 39 | } |
484 | 39 | 40 | ||
485 | 40 | var _ = gc.Suite(&CloudInitSuite{}) | 41 | var _ = gc.Suite(&CloudInitSuite{}) |
486 | 41 | 42 | ||
487 | === modified file 'environs/config/config_test.go' | |||
488 | --- environs/config/config_test.go 2013-09-19 02:17:33 +0000 | |||
489 | +++ environs/config/config_test.go 2013-09-20 02:56:01 +0000 | |||
490 | @@ -17,6 +17,7 @@ | |||
491 | 17 | "launchpad.net/juju-core/schema" | 17 | "launchpad.net/juju-core/schema" |
492 | 18 | "launchpad.net/juju-core/testing" | 18 | "launchpad.net/juju-core/testing" |
493 | 19 | jc "launchpad.net/juju-core/testing/checkers" | 19 | jc "launchpad.net/juju-core/testing/checkers" |
494 | 20 | "launchpad.net/juju-core/testing/testbase" | ||
495 | 20 | "launchpad.net/juju-core/version" | 21 | "launchpad.net/juju-core/version" |
496 | 21 | ) | 22 | ) |
497 | 22 | 23 | ||
498 | @@ -25,7 +26,7 @@ | |||
499 | 25 | } | 26 | } |
500 | 26 | 27 | ||
501 | 27 | type ConfigSuite struct { | 28 | type ConfigSuite struct { |
503 | 28 | testing.LoggingSuite | 29 | testbase.LoggingSuite |
504 | 29 | home string | 30 | home string |
505 | 30 | } | 31 | } |
506 | 31 | 32 | ||
507 | 32 | 33 | ||
508 | === modified file 'environs/httpstorage/backend_test.go' | |||
509 | --- environs/httpstorage/backend_test.go 2013-09-19 03:14:56 +0000 | |||
510 | +++ environs/httpstorage/backend_test.go 2013-09-20 02:56:01 +0000 | |||
511 | @@ -18,7 +18,7 @@ | |||
512 | 18 | 18 | ||
513 | 19 | "launchpad.net/juju-core/environs/filestorage" | 19 | "launchpad.net/juju-core/environs/filestorage" |
514 | 20 | "launchpad.net/juju-core/environs/httpstorage" | 20 | "launchpad.net/juju-core/environs/httpstorage" |
516 | 21 | "launchpad.net/juju-core/testing" | 21 | "launchpad.net/juju-core/testing/testbase" |
517 | 22 | ) | 22 | ) |
518 | 23 | 23 | ||
519 | 24 | func TestLocal(t *stdtesting.T) { | 24 | func TestLocal(t *stdtesting.T) { |
520 | @@ -26,7 +26,7 @@ | |||
521 | 26 | } | 26 | } |
522 | 27 | 27 | ||
523 | 28 | type backendSuite struct { | 28 | type backendSuite struct { |
525 | 29 | testing.LoggingSuite | 29 | testbase.LoggingSuite |
526 | 30 | } | 30 | } |
527 | 31 | 31 | ||
528 | 32 | var _ = gc.Suite(&backendSuite{}) | 32 | var _ = gc.Suite(&backendSuite{}) |
529 | 33 | 33 | ||
530 | === modified file 'environs/imagemetadata/validation_test.go' | |||
531 | --- environs/imagemetadata/validation_test.go 2013-09-12 00:17:20 +0000 | |||
532 | +++ environs/imagemetadata/validation_test.go 2013-09-20 02:56:01 +0000 | |||
533 | @@ -10,10 +10,11 @@ | |||
534 | 10 | "launchpad.net/juju-core/environs/imagemetadata" | 10 | "launchpad.net/juju-core/environs/imagemetadata" |
535 | 11 | "launchpad.net/juju-core/environs/simplestreams" | 11 | "launchpad.net/juju-core/environs/simplestreams" |
536 | 12 | coretesting "launchpad.net/juju-core/testing" | 12 | coretesting "launchpad.net/juju-core/testing" |
537 | 13 | "launchpad.net/juju-core/testing/testbase" | ||
538 | 13 | ) | 14 | ) |
539 | 14 | 15 | ||
540 | 15 | type ValidateSuite struct { | 16 | type ValidateSuite struct { |
542 | 16 | coretesting.LoggingSuite | 17 | testbase.LoggingSuite |
543 | 17 | home *coretesting.FakeHome | 18 | home *coretesting.FakeHome |
544 | 18 | } | 19 | } |
545 | 19 | 20 | ||
546 | 20 | 21 | ||
547 | === modified file 'environs/instances/image_test.go' | |||
548 | --- environs/instances/image_test.go 2013-09-13 14:48:13 +0000 | |||
549 | +++ environs/instances/image_test.go 2013-09-20 02:56:01 +0000 | |||
550 | @@ -11,11 +11,11 @@ | |||
551 | 11 | "launchpad.net/juju-core/constraints" | 11 | "launchpad.net/juju-core/constraints" |
552 | 12 | "launchpad.net/juju-core/environs/imagemetadata" | 12 | "launchpad.net/juju-core/environs/imagemetadata" |
553 | 13 | "launchpad.net/juju-core/environs/simplestreams" | 13 | "launchpad.net/juju-core/environs/simplestreams" |
555 | 14 | coretesting "launchpad.net/juju-core/testing" | 14 | "launchpad.net/juju-core/testing/testbase" |
556 | 15 | ) | 15 | ) |
557 | 16 | 16 | ||
558 | 17 | type imageSuite struct { | 17 | type imageSuite struct { |
560 | 18 | coretesting.LoggingSuite | 18 | testbase.LoggingSuite |
561 | 19 | } | 19 | } |
562 | 20 | 20 | ||
563 | 21 | func Test(t *testing.T) { | 21 | func Test(t *testing.T) { |
564 | @@ -24,14 +24,6 @@ | |||
565 | 24 | 24 | ||
566 | 25 | var _ = gc.Suite(&imageSuite{}) | 25 | var _ = gc.Suite(&imageSuite{}) |
567 | 26 | 26 | ||
568 | 27 | func (s *imageSuite) SetUpSuite(c *gc.C) { | ||
569 | 28 | s.LoggingSuite.SetUpSuite(c) | ||
570 | 29 | } | ||
571 | 30 | |||
572 | 31 | func (s *imageSuite) TearDownSuite(c *gc.C) { | ||
573 | 32 | s.LoggingSuite.TearDownTest(c) | ||
574 | 33 | } | ||
575 | 34 | |||
576 | 35 | var jsonImagesContent = ` | 27 | var jsonImagesContent = ` |
577 | 36 | { | 28 | { |
578 | 37 | "content_id": "com.ubuntu.cloud:released:aws", | 29 | "content_id": "com.ubuntu.cloud:released:aws", |
579 | 38 | 30 | ||
580 | === modified file 'environs/instances/instancetype_test.go' | |||
581 | --- environs/instances/instancetype_test.go 2013-08-14 17:33:09 +0000 | |||
582 | +++ environs/instances/instancetype_test.go 2013-09-20 02:56:01 +0000 | |||
583 | @@ -9,23 +9,15 @@ | |||
584 | 9 | gc "launchpad.net/gocheck" | 9 | gc "launchpad.net/gocheck" |
585 | 10 | 10 | ||
586 | 11 | "launchpad.net/juju-core/constraints" | 11 | "launchpad.net/juju-core/constraints" |
588 | 12 | "launchpad.net/juju-core/testing" | 12 | "launchpad.net/juju-core/testing/testbase" |
589 | 13 | ) | 13 | ) |
590 | 14 | 14 | ||
591 | 15 | type instanceTypeSuite struct { | 15 | type instanceTypeSuite struct { |
593 | 16 | testing.LoggingSuite | 16 | testbase.LoggingSuite |
594 | 17 | } | 17 | } |
595 | 18 | 18 | ||
596 | 19 | var _ = gc.Suite(&instanceTypeSuite{}) | 19 | var _ = gc.Suite(&instanceTypeSuite{}) |
597 | 20 | 20 | ||
598 | 21 | func (s *instanceTypeSuite) SetUpSuite(c *gc.C) { | ||
599 | 22 | s.LoggingSuite.SetUpSuite(c) | ||
600 | 23 | } | ||
601 | 24 | |||
602 | 25 | func (s *instanceTypeSuite) TearDownSuite(c *gc.C) { | ||
603 | 26 | s.LoggingSuite.TearDownTest(c) | ||
604 | 27 | } | ||
605 | 28 | |||
606 | 29 | var hvm = "hvm" | 21 | var hvm = "hvm" |
607 | 30 | 22 | ||
608 | 31 | // The instance types below do not necessarily reflect reality and are just | 23 | // The instance types below do not necessarily reflect reality and are just |
609 | 32 | 24 | ||
610 | === modified file 'environs/jujutest/livetests.go' | |||
611 | --- environs/jujutest/livetests.go 2013-09-18 22:54:32 +0000 | |||
612 | +++ environs/jujutest/livetests.go 2013-09-20 02:56:01 +0000 | |||
613 | @@ -33,6 +33,7 @@ | |||
614 | 33 | statetesting "launchpad.net/juju-core/state/testing" | 33 | statetesting "launchpad.net/juju-core/state/testing" |
615 | 34 | coretesting "launchpad.net/juju-core/testing" | 34 | coretesting "launchpad.net/juju-core/testing" |
616 | 35 | jc "launchpad.net/juju-core/testing/checkers" | 35 | jc "launchpad.net/juju-core/testing/checkers" |
617 | 36 | "launchpad.net/juju-core/testing/testbase" | ||
618 | 36 | coretools "launchpad.net/juju-core/tools" | 37 | coretools "launchpad.net/juju-core/tools" |
619 | 37 | "launchpad.net/juju-core/utils" | 38 | "launchpad.net/juju-core/utils" |
620 | 38 | "launchpad.net/juju-core/version" | 39 | "launchpad.net/juju-core/version" |
621 | @@ -42,7 +43,7 @@ | |||
622 | 42 | // (e.g. Amazon EC2). The Environ is opened once only for all the tests | 43 | // (e.g. Amazon EC2). The Environ is opened once only for all the tests |
623 | 43 | // in the suite, stored in Env, and Destroyed after the suite has completed. | 44 | // in the suite, stored in Env, and Destroyed after the suite has completed. |
624 | 44 | type LiveTests struct { | 45 | type LiveTests struct { |
626 | 45 | coretesting.LoggingSuite | 46 | testbase.LoggingSuite |
627 | 46 | envtesting.ToolsFixture | 47 | envtesting.ToolsFixture |
628 | 47 | 48 | ||
629 | 48 | // TestConfig contains the configuration attributes for opening an environment. | 49 | // TestConfig contains the configuration attributes for opening an environment. |
630 | 49 | 50 | ||
631 | === modified file 'environs/jujutest/tests.go' | |||
632 | --- environs/jujutest/tests.go 2013-09-18 22:54:32 +0000 | |||
633 | +++ environs/jujutest/tests.go 2013-09-20 02:56:01 +0000 | |||
634 | @@ -22,6 +22,7 @@ | |||
635 | 22 | "launchpad.net/juju-core/juju/testing" | 22 | "launchpad.net/juju-core/juju/testing" |
636 | 23 | coretesting "launchpad.net/juju-core/testing" | 23 | coretesting "launchpad.net/juju-core/testing" |
637 | 24 | jc "launchpad.net/juju-core/testing/checkers" | 24 | jc "launchpad.net/juju-core/testing/checkers" |
638 | 25 | "launchpad.net/juju-core/testing/testbase" | ||
639 | 25 | "launchpad.net/juju-core/utils" | 26 | "launchpad.net/juju-core/utils" |
640 | 26 | "launchpad.net/juju-core/version" | 27 | "launchpad.net/juju-core/version" |
641 | 27 | ) | 28 | ) |
642 | @@ -32,7 +33,7 @@ | |||
643 | 32 | // is opened once for each test, and some potentially expensive operations | 33 | // is opened once for each test, and some potentially expensive operations |
644 | 33 | // may be executed. | 34 | // may be executed. |
645 | 34 | type Tests struct { | 35 | type Tests struct { |
647 | 35 | coretesting.LoggingSuite | 36 | testbase.LoggingSuite |
648 | 36 | TestConfig coretesting.Attrs | 37 | TestConfig coretesting.Attrs |
649 | 37 | envtesting.ToolsFixture | 38 | envtesting.ToolsFixture |
650 | 38 | Env environs.Environ | 39 | Env environs.Environ |
651 | 39 | 40 | ||
652 | === modified file 'environs/manual/detection_test.go' | |||
653 | --- environs/manual/detection_test.go 2013-09-11 01:58:11 +0000 | |||
654 | +++ environs/manual/detection_test.go 2013-09-20 02:56:01 +0000 | |||
655 | @@ -12,12 +12,12 @@ | |||
656 | 12 | 12 | ||
657 | 13 | gc "launchpad.net/gocheck" | 13 | gc "launchpad.net/gocheck" |
658 | 14 | 14 | ||
659 | 15 | "launchpad.net/juju-core/testing" | ||
660 | 16 | jc "launchpad.net/juju-core/testing/checkers" | 15 | jc "launchpad.net/juju-core/testing/checkers" |
661 | 16 | "launchpad.net/juju-core/testing/testbase" | ||
662 | 17 | ) | 17 | ) |
663 | 18 | 18 | ||
664 | 19 | type detectionSuite struct { | 19 | type detectionSuite struct { |
666 | 20 | testing.LoggingSuite | 20 | testbase.LoggingSuite |
667 | 21 | } | 21 | } |
668 | 22 | 22 | ||
669 | 23 | var _ = gc.Suite(&detectionSuite{}) | 23 | var _ = gc.Suite(&detectionSuite{}) |
670 | @@ -71,7 +71,7 @@ | |||
671 | 71 | c.Assert(err, gc.IsNil) | 71 | c.Assert(err, gc.IsNil) |
672 | 72 | err = ioutil.WriteFile(sshexpectedinput, []byte(input), 0644) | 72 | err = ioutil.WriteFile(sshexpectedinput, []byte(input), 0644) |
673 | 73 | c.Assert(err, gc.IsNil) | 73 | c.Assert(err, gc.IsNil) |
675 | 74 | return testing.PatchEnvironment("PATH", fakebin+":"+os.Getenv("PATH")) | 74 | return testbase.PatchEnvironment("PATH", fakebin+":"+os.Getenv("PATH")) |
676 | 75 | } | 75 | } |
677 | 76 | 76 | ||
678 | 77 | func (s *detectionSuite) TestDetectSeries(c *gc.C) { | 77 | func (s *detectionSuite) TestDetectSeries(c *gc.C) { |
679 | 78 | 78 | ||
680 | === modified file 'environs/mongo_test.go' | |||
681 | --- environs/mongo_test.go 2013-08-21 18:38:22 +0000 | |||
682 | +++ environs/mongo_test.go 2013-09-20 02:56:01 +0000 | |||
683 | @@ -9,12 +9,13 @@ | |||
684 | 9 | "launchpad.net/juju-core/environs" | 9 | "launchpad.net/juju-core/environs" |
685 | 10 | "launchpad.net/juju-core/provider/dummy" | 10 | "launchpad.net/juju-core/provider/dummy" |
686 | 11 | "launchpad.net/juju-core/testing" | 11 | "launchpad.net/juju-core/testing" |
687 | 12 | "launchpad.net/juju-core/testing/testbase" | ||
688 | 12 | "launchpad.net/juju-core/version" | 13 | "launchpad.net/juju-core/version" |
689 | 13 | ) | 14 | ) |
690 | 14 | 15 | ||
691 | 15 | type MongoToolsSuite struct { | 16 | type MongoToolsSuite struct { |
692 | 16 | env environs.Environ | 17 | env environs.Environ |
694 | 17 | testing.LoggingSuite | 18 | testbase.LoggingSuite |
695 | 18 | dataDir string | 19 | dataDir string |
696 | 19 | } | 20 | } |
697 | 20 | 21 | ||
698 | 21 | 22 | ||
699 | === modified file 'environs/simplestreams/testing/testing.go' | |||
700 | --- environs/simplestreams/testing/testing.go 2013-09-09 03:45:08 +0000 | |||
701 | +++ environs/simplestreams/testing/testing.go 2013-09-20 02:56:01 +0000 | |||
702 | @@ -13,7 +13,7 @@ | |||
703 | 13 | 13 | ||
704 | 14 | "launchpad.net/juju-core/environs/jujutest" | 14 | "launchpad.net/juju-core/environs/jujutest" |
705 | 15 | "launchpad.net/juju-core/environs/simplestreams" | 15 | "launchpad.net/juju-core/environs/simplestreams" |
707 | 16 | "launchpad.net/juju-core/testing" | 16 | "launchpad.net/juju-core/testing/testbase" |
708 | 17 | ) | 17 | ) |
709 | 18 | 18 | ||
710 | 19 | var imageData = map[string]string{ | 19 | var imageData = map[string]string{ |
711 | @@ -392,7 +392,7 @@ | |||
712 | 392 | } | 392 | } |
713 | 393 | 393 | ||
714 | 394 | type LocalLiveSimplestreamsSuite struct { | 394 | type LocalLiveSimplestreamsSuite struct { |
716 | 395 | testing.LoggingSuite | 395 | testbase.LoggingSuite |
717 | 396 | Source simplestreams.DataSource | 396 | Source simplestreams.DataSource |
718 | 397 | RequireSigned bool | 397 | RequireSigned bool |
719 | 398 | DataType string | 398 | DataType string |
720 | 399 | 399 | ||
721 | === modified file 'environs/sshstorage/storage_test.go' | |||
722 | --- environs/sshstorage/storage_test.go 2013-09-20 01:34:00 +0000 | |||
723 | +++ environs/sshstorage/storage_test.go 2013-09-20 02:56:01 +0000 | |||
724 | @@ -20,13 +20,13 @@ | |||
725 | 20 | 20 | ||
726 | 21 | "launchpad.net/juju-core/environs/storage" | 21 | "launchpad.net/juju-core/environs/storage" |
727 | 22 | coreerrors "launchpad.net/juju-core/errors" | 22 | coreerrors "launchpad.net/juju-core/errors" |
728 | 23 | "launchpad.net/juju-core/testing" | ||
729 | 24 | jc "launchpad.net/juju-core/testing/checkers" | 23 | jc "launchpad.net/juju-core/testing/checkers" |
730 | 24 | "launchpad.net/juju-core/testing/testbase" | ||
731 | 25 | "launchpad.net/juju-core/utils" | 25 | "launchpad.net/juju-core/utils" |
732 | 26 | ) | 26 | ) |
733 | 27 | 27 | ||
734 | 28 | type storageSuite struct { | 28 | type storageSuite struct { |
736 | 29 | testing.LoggingSuite | 29 | testbase.LoggingSuite |
737 | 30 | restoreEnv func() | 30 | restoreEnv func() |
738 | 31 | } | 31 | } |
739 | 32 | 32 | ||
740 | @@ -42,8 +42,8 @@ | |||
741 | 42 | cmd := exec.Command("bash", "-c", command) | 42 | cmd := exec.Command("bash", "-c", command) |
742 | 43 | uid := fmt.Sprint(os.Getuid()) | 43 | uid := fmt.Sprint(os.Getuid()) |
743 | 44 | gid := fmt.Sprint(os.Getgid()) | 44 | gid := fmt.Sprint(os.Getgid()) |
746 | 45 | defer testing.PatchEnvironment("SUDO_UID", uid)() | 45 | defer testbase.PatchEnvironment("SUDO_UID", uid)() |
747 | 46 | defer testing.PatchEnvironment("SUDO_GID", gid)() | 46 | defer testbase.PatchEnvironment("SUDO_GID", gid)() |
748 | 47 | cmd.Env = os.Environ() | 47 | cmd.Env = os.Environ() |
749 | 48 | return cmd | 48 | return cmd |
750 | 49 | } | 49 | } |
751 | @@ -59,7 +59,7 @@ | |||
752 | 59 | c.Assert(err, gc.IsNil) | 59 | c.Assert(err, gc.IsNil) |
753 | 60 | 60 | ||
754 | 61 | bin := c.MkDir() | 61 | bin := c.MkDir() |
756 | 62 | s.restoreEnv = testing.PatchEnvironment("PATH", bin+":"+os.Getenv("PATH")) | 62 | s.restoreEnv = testbase.PatchEnvironment("PATH", bin+":"+os.Getenv("PATH")) |
757 | 63 | 63 | ||
758 | 64 | // Create a "sudo" command which just executes its args. | 64 | // Create a "sudo" command which just executes its args. |
759 | 65 | c.Assert(os.Symlink("/usr/bin/env", filepath.Join(bin, "sudo")), gc.IsNil) | 65 | c.Assert(os.Symlink("/usr/bin/env", filepath.Join(bin, "sudo")), gc.IsNil) |
760 | 66 | 66 | ||
761 | === modified file 'environs/sync/sync_test.go' | |||
762 | --- environs/sync/sync_test.go 2013-09-20 00:33:38 +0000 | |||
763 | +++ environs/sync/sync_test.go 2013-09-20 02:56:01 +0000 | |||
764 | @@ -25,6 +25,7 @@ | |||
765 | 25 | envtools "launchpad.net/juju-core/environs/tools" | 25 | envtools "launchpad.net/juju-core/environs/tools" |
766 | 26 | "launchpad.net/juju-core/provider/dummy" | 26 | "launchpad.net/juju-core/provider/dummy" |
767 | 27 | coretesting "launchpad.net/juju-core/testing" | 27 | coretesting "launchpad.net/juju-core/testing" |
768 | 28 | "launchpad.net/juju-core/testing/testbase" | ||
769 | 28 | coretools "launchpad.net/juju-core/tools" | 29 | coretools "launchpad.net/juju-core/tools" |
770 | 29 | "launchpad.net/juju-core/version" | 30 | "launchpad.net/juju-core/version" |
771 | 30 | ) | 31 | ) |
772 | @@ -34,7 +35,7 @@ | |||
773 | 34 | } | 35 | } |
774 | 35 | 36 | ||
775 | 36 | type syncSuite struct { | 37 | type syncSuite struct { |
777 | 37 | coretesting.LoggingSuite | 38 | testbase.LoggingSuite |
778 | 38 | envtesting.ToolsFixture | 39 | envtesting.ToolsFixture |
779 | 39 | home *coretesting.FakeHome | 40 | home *coretesting.FakeHome |
780 | 40 | targetEnv environs.Environ | 41 | targetEnv environs.Environ |
781 | @@ -241,7 +242,7 @@ | |||
782 | 241 | 242 | ||
783 | 242 | type uploadSuite struct { | 243 | type uploadSuite struct { |
784 | 243 | env environs.Environ | 244 | env environs.Environ |
786 | 244 | coretesting.LoggingSuite | 245 | testbase.LoggingSuite |
787 | 245 | envtesting.ToolsFixture | 246 | envtesting.ToolsFixture |
788 | 246 | } | 247 | } |
789 | 247 | 248 | ||
790 | 248 | 249 | ||
791 | === modified file 'environs/tools/build_test.go' | |||
792 | --- environs/tools/build_test.go 2013-08-21 01:31:34 +0000 | |||
793 | +++ environs/tools/build_test.go 2013-09-20 02:56:01 +0000 | |||
794 | @@ -12,11 +12,11 @@ | |||
795 | 12 | gc "launchpad.net/gocheck" | 12 | gc "launchpad.net/gocheck" |
796 | 13 | 13 | ||
797 | 14 | "launchpad.net/juju-core/environs/tools" | 14 | "launchpad.net/juju-core/environs/tools" |
799 | 15 | "launchpad.net/juju-core/testing" | 15 | "launchpad.net/juju-core/testing/testbase" |
800 | 16 | ) | 16 | ) |
801 | 17 | 17 | ||
802 | 18 | type buildSuite struct { | 18 | type buildSuite struct { |
804 | 19 | testing.LoggingSuite | 19 | testbase.LoggingSuite |
805 | 20 | restore func() | 20 | restore func() |
806 | 21 | cwd string | 21 | cwd string |
807 | 22 | filePath string | 22 | filePath string |
808 | 23 | 23 | ||
809 | === modified file 'environs/tools/storage_test.go' | |||
810 | --- environs/tools/storage_test.go 2013-09-17 05:29:35 +0000 | |||
811 | +++ environs/tools/storage_test.go 2013-09-20 02:56:01 +0000 | |||
812 | @@ -11,14 +11,14 @@ | |||
813 | 11 | envtesting "launchpad.net/juju-core/environs/testing" | 11 | envtesting "launchpad.net/juju-core/environs/testing" |
814 | 12 | envtools "launchpad.net/juju-core/environs/tools" | 12 | envtools "launchpad.net/juju-core/environs/tools" |
815 | 13 | "launchpad.net/juju-core/provider/dummy" | 13 | "launchpad.net/juju-core/provider/dummy" |
817 | 14 | "launchpad.net/juju-core/testing" | 14 | "launchpad.net/juju-core/testing/testbase" |
818 | 15 | coretools "launchpad.net/juju-core/tools" | 15 | coretools "launchpad.net/juju-core/tools" |
819 | 16 | "launchpad.net/juju-core/version" | 16 | "launchpad.net/juju-core/version" |
820 | 17 | ) | 17 | ) |
821 | 18 | 18 | ||
822 | 19 | type StorageSuite struct { | 19 | type StorageSuite struct { |
823 | 20 | env environs.Environ | 20 | env environs.Environ |
825 | 21 | testing.LoggingSuite | 21 | testbase.LoggingSuite |
826 | 22 | dataDir string | 22 | dataDir string |
827 | 23 | } | 23 | } |
828 | 24 | 24 | ||
829 | 25 | 25 | ||
830 | === modified file 'environs/tools/tools_test.go' | |||
831 | --- environs/tools/tools_test.go 2013-09-20 00:33:38 +0000 | |||
832 | +++ environs/tools/tools_test.go 2013-09-20 02:56:01 +0000 | |||
833 | @@ -22,8 +22,8 @@ | |||
834 | 22 | envtools "launchpad.net/juju-core/environs/tools" | 22 | envtools "launchpad.net/juju-core/environs/tools" |
835 | 23 | "launchpad.net/juju-core/errors" | 23 | "launchpad.net/juju-core/errors" |
836 | 24 | "launchpad.net/juju-core/provider/dummy" | 24 | "launchpad.net/juju-core/provider/dummy" |
837 | 25 | "launchpad.net/juju-core/testing" | ||
838 | 26 | jc "launchpad.net/juju-core/testing/checkers" | 25 | jc "launchpad.net/juju-core/testing/checkers" |
839 | 26 | "launchpad.net/juju-core/testing/testbase" | ||
840 | 27 | coretools "launchpad.net/juju-core/tools" | 27 | coretools "launchpad.net/juju-core/tools" |
841 | 28 | "launchpad.net/juju-core/version" | 28 | "launchpad.net/juju-core/version" |
842 | 29 | ) | 29 | ) |
843 | @@ -40,7 +40,7 @@ | |||
844 | 40 | type ToolsSuite struct { | 40 | type ToolsSuite struct { |
845 | 41 | toolsTestHelper | 41 | toolsTestHelper |
846 | 42 | env environs.Environ | 42 | env environs.Environ |
848 | 43 | testing.LoggingSuite | 43 | testbase.LoggingSuite |
849 | 44 | envtesting.ToolsFixture | 44 | envtesting.ToolsFixture |
850 | 45 | origCurrentVersion version.Binary | 45 | origCurrentVersion version.Binary |
851 | 46 | } | 46 | } |
852 | 47 | 47 | ||
853 | === modified file 'environs/tools/validation_test.go' | |||
854 | --- environs/tools/validation_test.go 2013-09-12 00:17:20 +0000 | |||
855 | +++ environs/tools/validation_test.go 2013-09-20 02:56:01 +0000 | |||
856 | @@ -9,10 +9,11 @@ | |||
857 | 9 | "launchpad.net/juju-core/environs/config" | 9 | "launchpad.net/juju-core/environs/config" |
858 | 10 | "launchpad.net/juju-core/environs/simplestreams" | 10 | "launchpad.net/juju-core/environs/simplestreams" |
859 | 11 | coretesting "launchpad.net/juju-core/testing" | 11 | coretesting "launchpad.net/juju-core/testing" |
860 | 12 | "launchpad.net/juju-core/testing/testbase" | ||
861 | 12 | ) | 13 | ) |
862 | 13 | 14 | ||
863 | 14 | type ValidateSuite struct { | 15 | type ValidateSuite struct { |
865 | 15 | coretesting.LoggingSuite | 16 | testbase.LoggingSuite |
866 | 16 | home *coretesting.FakeHome | 17 | home *coretesting.FakeHome |
867 | 17 | } | 18 | } |
868 | 18 | 19 | ||
869 | 19 | 20 | ||
870 | === modified file 'instance/address_test.go' | |||
871 | --- instance/address_test.go 2013-09-19 03:23:04 +0000 | |||
872 | +++ instance/address_test.go 2013-09-20 02:56:01 +0000 | |||
873 | @@ -9,11 +9,11 @@ | |||
874 | 9 | 9 | ||
875 | 10 | gc "launchpad.net/gocheck" | 10 | gc "launchpad.net/gocheck" |
876 | 11 | 11 | ||
878 | 12 | "launchpad.net/juju-core/testing" | 12 | "launchpad.net/juju-core/testing/testbase" |
879 | 13 | ) | 13 | ) |
880 | 14 | 14 | ||
881 | 15 | type AddressSuite struct { | 15 | type AddressSuite struct { |
883 | 16 | testing.LoggingSuite | 16 | testbase.LoggingSuite |
884 | 17 | } | 17 | } |
885 | 18 | 18 | ||
886 | 19 | var _ = gc.Suite(&AddressSuite{}) | 19 | var _ = gc.Suite(&AddressSuite{}) |
887 | 20 | 20 | ||
888 | === modified file 'juju/apiconn_test.go' | |||
889 | --- juju/apiconn_test.go 2013-09-19 17:06:44 +0000 | |||
890 | +++ juju/apiconn_test.go 2013-09-20 02:56:01 +0000 | |||
891 | @@ -20,10 +20,11 @@ | |||
892 | 20 | "launchpad.net/juju-core/state/api" | 20 | "launchpad.net/juju-core/state/api" |
893 | 21 | coretesting "launchpad.net/juju-core/testing" | 21 | coretesting "launchpad.net/juju-core/testing" |
894 | 22 | jc "launchpad.net/juju-core/testing/checkers" | 22 | jc "launchpad.net/juju-core/testing/checkers" |
895 | 23 | "launchpad.net/juju-core/testing/testbase" | ||
896 | 23 | ) | 24 | ) |
897 | 24 | 25 | ||
898 | 25 | type NewAPIConnSuite struct { | 26 | type NewAPIConnSuite struct { |
900 | 26 | coretesting.LoggingSuite | 27 | testbase.LoggingSuite |
901 | 27 | envtesting.ToolsFixture | 28 | envtesting.ToolsFixture |
902 | 28 | } | 29 | } |
903 | 29 | 30 | ||
904 | @@ -58,7 +59,7 @@ | |||
905 | 58 | } | 59 | } |
906 | 59 | 60 | ||
907 | 60 | type NewAPIClientSuite struct { | 61 | type NewAPIClientSuite struct { |
909 | 61 | coretesting.LoggingSuite | 62 | testbase.LoggingSuite |
910 | 62 | } | 63 | } |
911 | 63 | 64 | ||
912 | 64 | var _ = gc.Suite(&NewAPIClientSuite{}) | 65 | var _ = gc.Suite(&NewAPIClientSuite{}) |
913 | @@ -75,7 +76,7 @@ | |||
914 | 75 | // Make sure of that by providing a suitably long delay | 76 | // Make sure of that by providing a suitably long delay |
915 | 76 | // and checking that the connection happens within that | 77 | // and checking that the connection happens within that |
916 | 77 | // time. | 78 | // time. |
918 | 78 | defer coretesting.PatchValue(juju.ProviderConnectDelay, coretesting.LongWait).Restore() | 79 | defer testbase.PatchValue(juju.ProviderConnectDelay, coretesting.LongWait).Restore() |
919 | 79 | bootstrapEnv(c, coretesting.SampleEnvName) | 80 | bootstrapEnv(c, coretesting.SampleEnvName) |
920 | 80 | 81 | ||
921 | 81 | startTime := time.Now() | 82 | startTime := time.Now() |
922 | @@ -125,7 +126,7 @@ | |||
923 | 125 | called++ | 126 | called++ |
924 | 126 | return expectState, nil | 127 | return expectState, nil |
925 | 127 | } | 128 | } |
927 | 128 | defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() | 129 | defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
928 | 129 | st, err := juju.NewAPIFromName("noconfig", store) | 130 | st, err := juju.NewAPIFromName("noconfig", store) |
929 | 130 | c.Assert(err, gc.IsNil) | 131 | c.Assert(err, gc.IsNil) |
930 | 131 | c.Assert(st, gc.Equals, expectState) | 132 | c.Assert(st, gc.Equals, expectState) |
931 | @@ -138,7 +139,7 @@ | |||
932 | 138 | store := newConfigStore("noconfig", &environInfo{ | 139 | store := newConfigStore("noconfig", &environInfo{ |
933 | 139 | err: expectErr, | 140 | err: expectErr, |
934 | 140 | }) | 141 | }) |
936 | 141 | defer coretesting.PatchValue(juju.APIOpen, panicAPIOpen).Restore() | 142 | defer testbase.PatchValue(juju.APIOpen, panicAPIOpen).Restore() |
937 | 142 | client, err := juju.NewAPIFromName("noconfig", store) | 143 | client, err := juju.NewAPIFromName("noconfig", store) |
938 | 143 | c.Assert(err, gc.Equals, expectErr) | 144 | c.Assert(err, gc.Equals, expectErr) |
939 | 144 | c.Assert(client, gc.IsNil) | 145 | c.Assert(client, gc.IsNil) |
940 | @@ -157,7 +158,7 @@ | |||
941 | 157 | store := newConfigStore("noconfig", &environInfo{ | 158 | store := newConfigStore("noconfig", &environInfo{ |
942 | 158 | endpoint: endpoint, | 159 | endpoint: endpoint, |
943 | 159 | }) | 160 | }) |
945 | 160 | defer coretesting.PatchValue(juju.APIOpen, panicAPIOpen).Restore() | 161 | defer testbase.PatchValue(juju.APIOpen, panicAPIOpen).Restore() |
946 | 161 | 162 | ||
947 | 162 | st, err := juju.NewAPIFromName("noconfig", store) | 163 | st, err := juju.NewAPIFromName("noconfig", store) |
948 | 163 | c.Assert(err, gc.ErrorMatches, `environment "noconfig" not found`) | 164 | c.Assert(err, gc.ErrorMatches, `environment "noconfig" not found`) |
949 | @@ -177,7 +178,7 @@ | |||
950 | 177 | apiOpen := func(apiInfo *api.Info, opts api.DialOpts) (*api.State, error) { | 178 | apiOpen := func(apiInfo *api.Info, opts api.DialOpts) (*api.State, error) { |
951 | 178 | return nil, expectErr | 179 | return nil, expectErr |
952 | 179 | } | 180 | } |
954 | 180 | defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() | 181 | defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
955 | 181 | st, err := juju.NewAPIFromName("noconfig", store) | 182 | st, err := juju.NewAPIFromName("noconfig", store) |
956 | 182 | c.Assert(err, gc.Equals, expectErr) | 183 | c.Assert(err, gc.Equals, expectErr) |
957 | 183 | c.Assert(st, gc.IsNil) | 184 | c.Assert(st, gc.IsNil) |
958 | @@ -199,7 +200,7 @@ | |||
959 | 199 | // On a sample run with no delay, the logic took 45ms to run, so | 200 | // On a sample run with no delay, the logic took 45ms to run, so |
960 | 200 | // we make the delay slightly more than that, so that if the | 201 | // we make the delay slightly more than that, so that if the |
961 | 201 | // logic doesn't delay at all, the test will fail reasonably consistently. | 202 | // logic doesn't delay at all, the test will fail reasonably consistently. |
963 | 202 | defer coretesting.PatchValue(juju.ProviderConnectDelay, 50*time.Millisecond).Restore() | 203 | defer testbase.PatchValue(juju.ProviderConnectDelay, 50*time.Millisecond).Restore() |
964 | 203 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { | 204 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { |
965 | 204 | if info.Addrs[0] == "infoapi.com" { | 205 | if info.Addrs[0] == "infoapi.com" { |
966 | 205 | infoEndpointOpened <- struct{}{} | 206 | infoEndpointOpened <- struct{}{} |
967 | @@ -207,7 +208,7 @@ | |||
968 | 207 | } | 208 | } |
969 | 208 | return cfgOpenedState, nil | 209 | return cfgOpenedState, nil |
970 | 209 | } | 210 | } |
972 | 210 | defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() | 211 | defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
973 | 211 | 212 | ||
974 | 212 | stateClosed, restoreAPIClose := setAPIClosed() | 213 | stateClosed, restoreAPIClose := setAPIClosed() |
975 | 213 | defer restoreAPIClose.Restore() | 214 | defer restoreAPIClose.Restore() |
976 | @@ -250,7 +251,7 @@ | |||
977 | 250 | cfgOpenedState := new(api.State) | 251 | cfgOpenedState := new(api.State) |
978 | 251 | cfgEndpointOpened := make(chan struct{}) | 252 | cfgEndpointOpened := make(chan struct{}) |
979 | 252 | 253 | ||
981 | 253 | defer coretesting.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() | 254 | defer testbase.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() |
982 | 254 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { | 255 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { |
983 | 255 | if info.Addrs[0] == "infoapi.com" { | 256 | if info.Addrs[0] == "infoapi.com" { |
984 | 256 | infoEndpointOpened <- struct{}{} | 257 | infoEndpointOpened <- struct{}{} |
985 | @@ -261,7 +262,7 @@ | |||
986 | 261 | <-cfgEndpointOpened | 262 | <-cfgEndpointOpened |
987 | 262 | return cfgOpenedState, nil | 263 | return cfgOpenedState, nil |
988 | 263 | } | 264 | } |
990 | 264 | defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() | 265 | defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
991 | 265 | 266 | ||
992 | 266 | stateClosed, restoreAPIClose := setAPIClosed() | 267 | stateClosed, restoreAPIClose := setAPIClosed() |
993 | 267 | defer restoreAPIClose.Restore() | 268 | defer restoreAPIClose.Restore() |
994 | @@ -315,14 +316,14 @@ | |||
995 | 315 | endpoint: endpoint, | 316 | endpoint: endpoint, |
996 | 316 | }) | 317 | }) |
997 | 317 | 318 | ||
999 | 318 | defer coretesting.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() | 319 | defer testbase.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() |
1000 | 319 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { | 320 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { |
1001 | 320 | if info.Addrs[0] == "infoapi.com" { | 321 | if info.Addrs[0] == "infoapi.com" { |
1002 | 321 | return nil, fmt.Errorf("info connect failed") | 322 | return nil, fmt.Errorf("info connect failed") |
1003 | 322 | } | 323 | } |
1004 | 323 | return nil, fmt.Errorf("config connect failed") | 324 | return nil, fmt.Errorf("config connect failed") |
1005 | 324 | } | 325 | } |
1007 | 325 | defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() | 326 | defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
1008 | 326 | st, err := juju.NewAPIFromName(coretesting.SampleEnvName, store) | 327 | st, err := juju.NewAPIFromName(coretesting.SampleEnvName, store) |
1009 | 327 | c.Check(err, gc.ErrorMatches, "config connect failed") | 328 | c.Check(err, gc.ErrorMatches, "config connect failed") |
1010 | 328 | c.Check(st, gc.IsNil) | 329 | c.Check(st, gc.IsNil) |
1011 | @@ -344,13 +345,13 @@ | |||
1012 | 344 | c.Assert(envInfo.Name, gc.Equals, expectName) | 345 | c.Assert(envInfo.Name, gc.Equals, expectName) |
1013 | 345 | } | 346 | } |
1014 | 346 | 347 | ||
1016 | 347 | func setAPIClosed() (<-chan *api.State, coretesting.Restorer) { | 348 | func setAPIClosed() (<-chan *api.State, testbase.Restorer) { |
1017 | 348 | stateClosed := make(chan *api.State) | 349 | stateClosed := make(chan *api.State) |
1018 | 349 | apiClose := func(st *api.State) error { | 350 | apiClose := func(st *api.State) error { |
1019 | 350 | stateClosed <- st | 351 | stateClosed <- st |
1020 | 351 | return nil | 352 | return nil |
1021 | 352 | } | 353 | } |
1023 | 353 | return stateClosed, coretesting.PatchValue(juju.APIClose, apiClose) | 354 | return stateClosed, testbase.PatchValue(juju.APIClose, apiClose) |
1024 | 354 | } | 355 | } |
1025 | 355 | 356 | ||
1026 | 356 | func newConfigStore(envName string, info *environInfo) environs.ConfigStorage { | 357 | func newConfigStore(envName string, info *environInfo) environs.ConfigStorage { |
1027 | 357 | 358 | ||
1028 | === modified file 'juju/conn_test.go' | |||
1029 | --- juju/conn_test.go 2013-09-13 14:48:13 +0000 | |||
1030 | +++ juju/conn_test.go 2013-09-20 02:56:01 +0000 | |||
1031 | @@ -27,6 +27,7 @@ | |||
1032 | 27 | "launchpad.net/juju-core/state" | 27 | "launchpad.net/juju-core/state" |
1033 | 28 | coretesting "launchpad.net/juju-core/testing" | 28 | coretesting "launchpad.net/juju-core/testing" |
1034 | 29 | jc "launchpad.net/juju-core/testing/checkers" | 29 | jc "launchpad.net/juju-core/testing/checkers" |
1035 | 30 | "launchpad.net/juju-core/testing/testbase" | ||
1036 | 30 | "launchpad.net/juju-core/utils" | 31 | "launchpad.net/juju-core/utils" |
1037 | 31 | "launchpad.net/juju-core/utils/set" | 32 | "launchpad.net/juju-core/utils/set" |
1038 | 32 | ) | 33 | ) |
1039 | @@ -36,7 +37,7 @@ | |||
1040 | 36 | } | 37 | } |
1041 | 37 | 38 | ||
1042 | 38 | type NewConnSuite struct { | 39 | type NewConnSuite struct { |
1044 | 39 | coretesting.LoggingSuite | 40 | testbase.LoggingSuite |
1045 | 40 | envtesting.ToolsFixture | 41 | envtesting.ToolsFixture |
1046 | 41 | } | 42 | } |
1047 | 42 | 43 | ||
1048 | @@ -222,7 +223,7 @@ | |||
1049 | 222 | } | 223 | } |
1050 | 223 | 224 | ||
1051 | 224 | type ConnSuite struct { | 225 | type ConnSuite struct { |
1053 | 225 | coretesting.LoggingSuite | 226 | testbase.LoggingSuite |
1054 | 226 | coretesting.MgoSuite | 227 | coretesting.MgoSuite |
1055 | 227 | envtesting.ToolsFixture | 228 | envtesting.ToolsFixture |
1056 | 228 | conn *juju.Conn | 229 | conn *juju.Conn |
1057 | 229 | 230 | ||
1058 | === modified file 'juju/osenv/package_test.go' | |||
1059 | --- juju/osenv/package_test.go 2013-08-28 20:37:53 +0000 | |||
1060 | +++ juju/osenv/package_test.go 2013-09-20 02:56:01 +0000 | |||
1061 | @@ -8,7 +8,7 @@ | |||
1062 | 8 | 8 | ||
1063 | 9 | gc "launchpad.net/gocheck" | 9 | gc "launchpad.net/gocheck" |
1064 | 10 | 10 | ||
1066 | 11 | coretesting "launchpad.net/juju-core/testing" | 11 | "launchpad.net/juju-core/testing/testbase" |
1067 | 12 | ) | 12 | ) |
1068 | 13 | 13 | ||
1069 | 14 | func Test(t *testing.T) { | 14 | func Test(t *testing.T) { |
1070 | @@ -21,6 +21,6 @@ | |||
1071 | 21 | 21 | ||
1072 | 22 | func (*importSuite) TestDependencies(c *gc.C) { | 22 | func (*importSuite) TestDependencies(c *gc.C) { |
1073 | 23 | // This test is to ensure we don't bring in dependencies at all. | 23 | // This test is to ensure we don't bring in dependencies at all. |
1075 | 24 | c.Assert(coretesting.FindJujuCoreImports(c, "launchpad.net/juju-core/juju/osenv"), | 24 | c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/juju/osenv"), |
1076 | 25 | gc.HasLen, 0) | 25 | gc.HasLen, 0) |
1077 | 26 | } | 26 | } |
1078 | 27 | 27 | ||
1079 | === modified file 'juju/osenv/vars_linux_test.go' | |||
1080 | --- juju/osenv/vars_linux_test.go 2013-09-04 14:27:52 +0000 | |||
1081 | +++ juju/osenv/vars_linux_test.go 2013-09-20 02:56:01 +0000 | |||
1082 | @@ -4,11 +4,11 @@ | |||
1083 | 4 | gc "launchpad.net/gocheck" | 4 | gc "launchpad.net/gocheck" |
1084 | 5 | 5 | ||
1085 | 6 | "launchpad.net/juju-core/juju/osenv" | 6 | "launchpad.net/juju-core/juju/osenv" |
1087 | 7 | "launchpad.net/juju-core/testing" | 7 | "launchpad.net/juju-core/testing/testbase" |
1088 | 8 | ) | 8 | ) |
1089 | 9 | 9 | ||
1090 | 10 | func (*importSuite) TestHomeLinux(c *gc.C) { | 10 | func (*importSuite) TestHomeLinux(c *gc.C) { |
1091 | 11 | h := "/home/foo/bar" | 11 | h := "/home/foo/bar" |
1093 | 12 | testing.PatchEnvironment("HOME", h) | 12 | testbase.PatchEnvironment("HOME", h) |
1094 | 13 | c.Check(osenv.Home(), gc.Equals, h) | 13 | c.Check(osenv.Home(), gc.Equals, h) |
1095 | 14 | } | 14 | } |
1096 | 15 | 15 | ||
1097 | === modified file 'juju/osenv/vars_windows_test.go' | |||
1098 | --- juju/osenv/vars_windows_test.go 2013-09-04 14:27:52 +0000 | |||
1099 | +++ juju/osenv/vars_windows_test.go 2013-09-20 02:56:01 +0000 | |||
1100 | @@ -10,8 +10,8 @@ | |||
1101 | 10 | ) | 10 | ) |
1102 | 11 | 11 | ||
1103 | 12 | func (*importSuite) TestHome(c *gc.C) { | 12 | func (*importSuite) TestHome(c *gc.C) { |
1106 | 13 | testing.PatchEnvironment("HOMEPATH", "") | 13 | testbase.PatchEnvironment("HOMEPATH", "") |
1107 | 14 | testing.PatchEnvironment("HOMEDRIVE", "") | 14 | testbase.PatchEnvironment("HOMEDRIVE", "") |
1108 | 15 | 15 | ||
1109 | 16 | drive := "P:" | 16 | drive := "P:" |
1110 | 17 | path := `\home\foo\bar` | 17 | path := `\home\foo\bar` |
1111 | 18 | 18 | ||
1112 | === modified file 'juju/testing/conn.go' | |||
1113 | --- juju/testing/conn.go 2013-09-17 04:06:28 +0000 | |||
1114 | +++ juju/testing/conn.go 2013-09-20 02:56:01 +0000 | |||
1115 | @@ -28,11 +28,12 @@ | |||
1116 | 28 | "launchpad.net/juju-core/state" | 28 | "launchpad.net/juju-core/state" |
1117 | 29 | "launchpad.net/juju-core/state/api" | 29 | "launchpad.net/juju-core/state/api" |
1118 | 30 | "launchpad.net/juju-core/testing" | 30 | "launchpad.net/juju-core/testing" |
1119 | 31 | "launchpad.net/juju-core/testing/testbase" | ||
1120 | 31 | "launchpad.net/juju-core/version" | 32 | "launchpad.net/juju-core/version" |
1121 | 32 | ) | 33 | ) |
1122 | 33 | 34 | ||
1123 | 34 | // JujuConnSuite provides a freshly bootstrapped juju.Conn | 35 | // JujuConnSuite provides a freshly bootstrapped juju.Conn |
1125 | 35 | // for each test. It also includes testing.LoggingSuite. | 36 | // for each test. It also includes testbase.LoggingSuite. |
1126 | 36 | // | 37 | // |
1127 | 37 | // It also sets up RootDir to point to a directory hierarchy | 38 | // It also sets up RootDir to point to a directory hierarchy |
1128 | 38 | // mirroring the intended juju directory structure, including | 39 | // mirroring the intended juju directory structure, including |
1129 | @@ -50,7 +51,7 @@ | |||
1130 | 50 | // /var/lib/juju: the use cases are completely non-overlapping, and any tests that | 51 | // /var/lib/juju: the use cases are completely non-overlapping, and any tests that |
1131 | 51 | // really do need both to exist ought to be embedding distinct fixtures for the | 52 | // really do need both to exist ought to be embedding distinct fixtures for the |
1132 | 52 | // distinct environments. | 53 | // distinct environments. |
1134 | 53 | testing.LoggingSuite | 54 | testbase.LoggingSuite |
1135 | 54 | testing.MgoSuite | 55 | testing.MgoSuite |
1136 | 55 | envtesting.ToolsFixture | 56 | envtesting.ToolsFixture |
1137 | 56 | Conn *juju.Conn | 57 | Conn *juju.Conn |
1138 | 57 | 58 | ||
1139 | === modified file 'provider/azure/azure_test.go' | |||
1140 | --- provider/azure/azure_test.go 2013-09-10 02:17:23 +0000 | |||
1141 | +++ provider/azure/azure_test.go 2013-09-20 02:56:01 +0000 | |||
1142 | @@ -9,7 +9,7 @@ | |||
1143 | 9 | gc "launchpad.net/gocheck" | 9 | gc "launchpad.net/gocheck" |
1144 | 10 | 10 | ||
1145 | 11 | envtesting "launchpad.net/juju-core/environs/testing" | 11 | envtesting "launchpad.net/juju-core/environs/testing" |
1147 | 12 | "launchpad.net/juju-core/testing" | 12 | "launchpad.net/juju-core/testing/testbase" |
1148 | 13 | ) | 13 | ) |
1149 | 14 | 14 | ||
1150 | 15 | func TestAzureProvider(t *stdtesting.T) { | 15 | func TestAzureProvider(t *stdtesting.T) { |
1151 | @@ -17,7 +17,7 @@ | |||
1152 | 17 | } | 17 | } |
1153 | 18 | 18 | ||
1154 | 19 | type providerSuite struct { | 19 | type providerSuite struct { |
1156 | 20 | testing.LoggingSuite | 20 | testbase.LoggingSuite |
1157 | 21 | envtesting.ToolsFixture | 21 | envtesting.ToolsFixture |
1158 | 22 | restoreTimeouts func() | 22 | restoreTimeouts func() |
1159 | 23 | } | 23 | } |
1160 | 24 | 24 | ||
1161 | === modified file 'provider/azure/config_test.go' | |||
1162 | --- provider/azure/config_test.go 2013-09-12 12:38:04 +0000 | |||
1163 | +++ provider/azure/config_test.go 2013-09-20 02:56:01 +0000 | |||
1164 | @@ -11,10 +11,11 @@ | |||
1165 | 11 | 11 | ||
1166 | 12 | "launchpad.net/juju-core/environs/config" | 12 | "launchpad.net/juju-core/environs/config" |
1167 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing" |
1168 | 14 | "launchpad.net/juju-core/testing/testbase" | ||
1169 | 14 | ) | 15 | ) |
1170 | 15 | 16 | ||
1171 | 16 | type configSuite struct { | 17 | type configSuite struct { |
1173 | 17 | testing.LoggingSuite | 18 | testbase.LoggingSuite |
1174 | 18 | } | 19 | } |
1175 | 19 | 20 | ||
1176 | 20 | var _ = gc.Suite(&configSuite{}) | 21 | var _ = gc.Suite(&configSuite{}) |
1177 | 21 | 22 | ||
1178 | === modified file 'provider/azure/customdata_test.go' | |||
1179 | --- provider/azure/customdata_test.go 2013-08-22 23:39:47 +0000 | |||
1180 | +++ provider/azure/customdata_test.go 2013-09-20 02:56:01 +0000 | |||
1181 | @@ -14,11 +14,12 @@ | |||
1182 | 14 | "launchpad.net/juju-core/state" | 14 | "launchpad.net/juju-core/state" |
1183 | 15 | "launchpad.net/juju-core/state/api" | 15 | "launchpad.net/juju-core/state/api" |
1184 | 16 | "launchpad.net/juju-core/testing" | 16 | "launchpad.net/juju-core/testing" |
1185 | 17 | "launchpad.net/juju-core/testing/testbase" | ||
1186 | 17 | "launchpad.net/juju-core/tools" | 18 | "launchpad.net/juju-core/tools" |
1187 | 18 | ) | 19 | ) |
1188 | 19 | 20 | ||
1189 | 20 | type customDataSuite struct { | 21 | type customDataSuite struct { |
1191 | 21 | testing.LoggingSuite | 22 | testbase.LoggingSuite |
1192 | 22 | } | 23 | } |
1193 | 23 | 24 | ||
1194 | 24 | var _ = gc.Suite(&customDataSuite{}) | 25 | var _ = gc.Suite(&customDataSuite{}) |
1195 | 25 | 26 | ||
1196 | === modified file 'provider/ec2/config_test.go' | |||
1197 | --- provider/ec2/config_test.go 2013-09-18 07:13:09 +0000 | |||
1198 | +++ provider/ec2/config_test.go 2013-09-20 02:56:01 +0000 | |||
1199 | @@ -18,12 +18,13 @@ | |||
1200 | 18 | "launchpad.net/juju-core/environs/config" | 18 | "launchpad.net/juju-core/environs/config" |
1201 | 19 | "launchpad.net/juju-core/juju/osenv" | 19 | "launchpad.net/juju-core/juju/osenv" |
1202 | 20 | "launchpad.net/juju-core/testing" | 20 | "launchpad.net/juju-core/testing" |
1203 | 21 | "launchpad.net/juju-core/testing/testbase" | ||
1204 | 21 | ) | 22 | ) |
1205 | 22 | 23 | ||
1206 | 23 | // Use local suite since this file lives in the ec2 package | 24 | // Use local suite since this file lives in the ec2 package |
1207 | 24 | // for testing internals. | 25 | // for testing internals. |
1208 | 25 | type ConfigSuite struct { | 26 | type ConfigSuite struct { |
1210 | 26 | testing.LoggingSuite | 27 | testbase.LoggingSuite |
1211 | 27 | savedHome, savedAccessKey, savedSecretKey string | 28 | savedHome, savedAccessKey, savedSecretKey string |
1212 | 28 | } | 29 | } |
1213 | 29 | 30 | ||
1214 | 30 | 31 | ||
1215 | === modified file 'provider/ec2/image_test.go' | |||
1216 | --- provider/ec2/image_test.go 2013-09-18 22:54:32 +0000 | |||
1217 | +++ provider/ec2/image_test.go 2013-09-20 02:56:01 +0000 | |||
1218 | @@ -10,11 +10,11 @@ | |||
1219 | 10 | "launchpad.net/juju-core/environs/imagemetadata" | 10 | "launchpad.net/juju-core/environs/imagemetadata" |
1220 | 11 | "launchpad.net/juju-core/environs/instances" | 11 | "launchpad.net/juju-core/environs/instances" |
1221 | 12 | "launchpad.net/juju-core/environs/simplestreams" | 12 | "launchpad.net/juju-core/environs/simplestreams" |
1223 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing/testbase" |
1224 | 14 | ) | 14 | ) |
1225 | 15 | 15 | ||
1226 | 16 | type imageSuite struct { | 16 | type imageSuite struct { |
1228 | 17 | testing.LoggingSuite | 17 | testbase.LoggingSuite |
1229 | 18 | } | 18 | } |
1230 | 19 | 19 | ||
1231 | 20 | var _ = gc.Suite(&imageSuite{}) | 20 | var _ = gc.Suite(&imageSuite{}) |
1232 | @@ -30,7 +30,7 @@ | |||
1233 | 30 | } | 30 | } |
1234 | 31 | 31 | ||
1235 | 32 | type specSuite struct { | 32 | type specSuite struct { |
1237 | 33 | testing.LoggingSuite | 33 | testbase.LoggingSuite |
1238 | 34 | } | 34 | } |
1239 | 35 | 35 | ||
1240 | 36 | var _ = gc.Suite(&specSuite{}) | 36 | var _ = gc.Suite(&specSuite{}) |
1241 | 37 | 37 | ||
1242 | === modified file 'provider/ec2/live_test.go' | |||
1243 | --- provider/ec2/live_test.go 2013-09-18 22:54:32 +0000 | |||
1244 | +++ provider/ec2/live_test.go 2013-09-20 02:56:01 +0000 | |||
1245 | @@ -26,6 +26,7 @@ | |||
1246 | 26 | "launchpad.net/juju-core/provider/ec2" | 26 | "launchpad.net/juju-core/provider/ec2" |
1247 | 27 | coretesting "launchpad.net/juju-core/testing" | 27 | coretesting "launchpad.net/juju-core/testing" |
1248 | 28 | jc "launchpad.net/juju-core/testing/checkers" | 28 | jc "launchpad.net/juju-core/testing/checkers" |
1249 | 29 | "launchpad.net/juju-core/testing/testbase" | ||
1250 | 29 | "launchpad.net/juju-core/version" | 30 | "launchpad.net/juju-core/version" |
1251 | 30 | ) | 31 | ) |
1252 | 31 | 32 | ||
1253 | @@ -72,7 +73,7 @@ | |||
1254 | 72 | // LiveTests contains tests that can be run against the Amazon servers. | 73 | // LiveTests contains tests that can be run against the Amazon servers. |
1255 | 73 | // Each test runs using the same ec2 connection. | 74 | // Each test runs using the same ec2 connection. |
1256 | 74 | type LiveTests struct { | 75 | type LiveTests struct { |
1258 | 75 | coretesting.LoggingSuite | 76 | testbase.LoggingSuite |
1259 | 76 | jujutest.LiveTests | 77 | jujutest.LiveTests |
1260 | 77 | writablePublicStorage storage.Storage | 78 | writablePublicStorage storage.Storage |
1261 | 78 | } | 79 | } |
1262 | 79 | 80 | ||
1263 | === modified file 'provider/ec2/local_test.go' | |||
1264 | --- provider/ec2/local_test.go 2013-09-17 05:09:55 +0000 | |||
1265 | +++ provider/ec2/local_test.go 2013-09-20 02:56:01 +0000 | |||
1266 | @@ -30,6 +30,7 @@ | |||
1267 | 30 | "launchpad.net/juju-core/provider/ec2" | 30 | "launchpad.net/juju-core/provider/ec2" |
1268 | 31 | "launchpad.net/juju-core/testing" | 31 | "launchpad.net/juju-core/testing" |
1269 | 32 | jc "launchpad.net/juju-core/testing/checkers" | 32 | jc "launchpad.net/juju-core/testing/checkers" |
1270 | 33 | "launchpad.net/juju-core/testing/testbase" | ||
1271 | 33 | "launchpad.net/juju-core/utils" | 34 | "launchpad.net/juju-core/utils" |
1272 | 34 | ) | 35 | ) |
1273 | 35 | 36 | ||
1274 | @@ -372,7 +373,7 @@ | |||
1275 | 372 | // localNonUSEastSuite is similar to localServerSuite but the S3 mock server | 373 | // localNonUSEastSuite is similar to localServerSuite but the S3 mock server |
1276 | 373 | // behaves as if it is not in the us-east region. | 374 | // behaves as if it is not in the us-east region. |
1277 | 374 | type localNonUSEastSuite struct { | 375 | type localNonUSEastSuite struct { |
1279 | 375 | testing.LoggingSuite | 376 | testbase.LoggingSuite |
1280 | 376 | restoreEC2Patching func() | 377 | restoreEC2Patching func() |
1281 | 377 | srv localServer | 378 | srv localServer |
1282 | 378 | env environs.Environ | 379 | env environs.Environ |
1283 | 379 | 380 | ||
1284 | === modified file 'provider/local/environprovider_test.go' | |||
1285 | --- provider/local/environprovider_test.go 2013-08-20 18:50:48 +0000 | |||
1286 | +++ provider/local/environprovider_test.go 2013-09-20 02:56:01 +0000 | |||
1287 | @@ -10,10 +10,11 @@ | |||
1288 | 10 | "launchpad.net/juju-core/container/lxc" | 10 | "launchpad.net/juju-core/container/lxc" |
1289 | 11 | "launchpad.net/juju-core/provider/local" | 11 | "launchpad.net/juju-core/provider/local" |
1290 | 12 | "launchpad.net/juju-core/testing" | 12 | "launchpad.net/juju-core/testing" |
1291 | 13 | "launchpad.net/juju-core/testing/testbase" | ||
1292 | 13 | ) | 14 | ) |
1293 | 14 | 15 | ||
1294 | 15 | type baseProviderSuite struct { | 16 | type baseProviderSuite struct { |
1296 | 16 | testing.LoggingSuite | 17 | testbase.LoggingSuite |
1297 | 17 | lxc.TestSuite | 18 | lxc.TestSuite |
1298 | 18 | home *testing.FakeHome | 19 | home *testing.FakeHome |
1299 | 19 | restore func() | 20 | restore func() |
1300 | 20 | 21 | ||
1301 | === modified file 'provider/local/local_test.go' | |||
1302 | --- provider/local/local_test.go 2013-08-27 18:33:36 +0000 | |||
1303 | +++ provider/local/local_test.go 2013-09-20 02:56:01 +0000 | |||
1304 | @@ -11,7 +11,7 @@ | |||
1305 | 11 | "launchpad.net/juju-core/environs" | 11 | "launchpad.net/juju-core/environs" |
1306 | 12 | "launchpad.net/juju-core/provider" | 12 | "launchpad.net/juju-core/provider" |
1307 | 13 | "launchpad.net/juju-core/provider/local" | 13 | "launchpad.net/juju-core/provider/local" |
1309 | 14 | "launchpad.net/juju-core/testing" | 14 | "launchpad.net/juju-core/testing/testbase" |
1310 | 15 | ) | 15 | ) |
1311 | 16 | 16 | ||
1312 | 17 | func TestLocal(t *stdtesting.T) { | 17 | func TestLocal(t *stdtesting.T) { |
1313 | @@ -19,7 +19,7 @@ | |||
1314 | 19 | } | 19 | } |
1315 | 20 | 20 | ||
1316 | 21 | type localSuite struct { | 21 | type localSuite struct { |
1318 | 22 | testing.LoggingSuite | 22 | testbase.LoggingSuite |
1319 | 23 | } | 23 | } |
1320 | 24 | 24 | ||
1321 | 25 | var _ = gc.Suite(&localSuite{}) | 25 | var _ = gc.Suite(&localSuite{}) |
1322 | 26 | 26 | ||
1323 | === modified file 'provider/local/prereqs_test.go' | |||
1324 | --- provider/local/prereqs_test.go 2013-08-09 06:42:05 +0000 | |||
1325 | +++ provider/local/prereqs_test.go 2013-09-20 02:56:01 +0000 | |||
1326 | @@ -10,11 +10,11 @@ | |||
1327 | 10 | 10 | ||
1328 | 11 | gc "launchpad.net/gocheck" | 11 | gc "launchpad.net/gocheck" |
1329 | 12 | 12 | ||
1331 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing/testbase" |
1332 | 14 | ) | 14 | ) |
1333 | 15 | 15 | ||
1334 | 16 | type prereqsSuite struct { | 16 | type prereqsSuite struct { |
1336 | 17 | testing.LoggingSuite | 17 | testbase.LoggingSuite |
1337 | 18 | tmpdir string | 18 | tmpdir string |
1338 | 19 | oldpath string | 19 | oldpath string |
1339 | 20 | } | 20 | } |
1340 | 21 | 21 | ||
1341 | === modified file 'provider/maas/config_test.go' | |||
1342 | --- provider/maas/config_test.go 2013-09-12 12:38:04 +0000 | |||
1343 | +++ provider/maas/config_test.go 2013-09-20 02:56:01 +0000 | |||
1344 | @@ -8,10 +8,11 @@ | |||
1345 | 8 | 8 | ||
1346 | 9 | "launchpad.net/juju-core/environs" | 9 | "launchpad.net/juju-core/environs" |
1347 | 10 | "launchpad.net/juju-core/testing" | 10 | "launchpad.net/juju-core/testing" |
1348 | 11 | "launchpad.net/juju-core/testing/testbase" | ||
1349 | 11 | ) | 12 | ) |
1350 | 12 | 13 | ||
1351 | 13 | type configSuite struct { | 14 | type configSuite struct { |
1353 | 14 | testing.LoggingSuite | 15 | testbase.LoggingSuite |
1354 | 15 | } | 16 | } |
1355 | 16 | 17 | ||
1356 | 17 | var _ = gc.Suite(&configSuite{}) | 18 | var _ = gc.Suite(&configSuite{}) |
1357 | 18 | 19 | ||
1358 | === modified file 'provider/maas/maas_test.go' | |||
1359 | --- provider/maas/maas_test.go 2013-09-06 01:48:40 +0000 | |||
1360 | +++ provider/maas/maas_test.go 2013-09-20 02:56:01 +0000 | |||
1361 | @@ -10,7 +10,7 @@ | |||
1362 | 10 | "launchpad.net/gomaasapi" | 10 | "launchpad.net/gomaasapi" |
1363 | 11 | 11 | ||
1364 | 12 | envtesting "launchpad.net/juju-core/environs/testing" | 12 | envtesting "launchpad.net/juju-core/environs/testing" |
1366 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing/testbase" |
1367 | 14 | ) | 14 | ) |
1368 | 15 | 15 | ||
1369 | 16 | func TestMAAS(t *stdtesting.T) { | 16 | func TestMAAS(t *stdtesting.T) { |
1370 | @@ -18,7 +18,7 @@ | |||
1371 | 18 | } | 18 | } |
1372 | 19 | 19 | ||
1373 | 20 | type providerSuite struct { | 20 | type providerSuite struct { |
1375 | 21 | testing.LoggingSuite | 21 | testbase.LoggingSuite |
1376 | 22 | envtesting.ToolsFixture | 22 | envtesting.ToolsFixture |
1377 | 23 | environ *maasEnviron | 23 | environ *maasEnviron |
1378 | 24 | testMAASObject *gomaasapi.TestMAASObject | 24 | testMAASObject *gomaasapi.TestMAASObject |
1379 | 25 | 25 | ||
1380 | === modified file 'provider/openstack/config_test.go' | |||
1381 | --- provider/openstack/config_test.go 2013-09-16 16:40:23 +0000 | |||
1382 | +++ provider/openstack/config_test.go 2013-09-20 02:56:01 +0000 | |||
1383 | @@ -15,10 +15,11 @@ | |||
1384 | 15 | "launchpad.net/juju-core/environs" | 15 | "launchpad.net/juju-core/environs" |
1385 | 16 | "launchpad.net/juju-core/environs/config" | 16 | "launchpad.net/juju-core/environs/config" |
1386 | 17 | "launchpad.net/juju-core/testing" | 17 | "launchpad.net/juju-core/testing" |
1387 | 18 | "launchpad.net/juju-core/testing/testbase" | ||
1388 | 18 | ) | 19 | ) |
1389 | 19 | 20 | ||
1390 | 20 | type ConfigSuite struct { | 21 | type ConfigSuite struct { |
1392 | 21 | testing.LoggingSuite | 22 | testbase.LoggingSuite |
1393 | 22 | savedVars map[string]string | 23 | savedVars map[string]string |
1394 | 23 | oldJujuHome *testing.FakeHome | 24 | oldJujuHome *testing.FakeHome |
1395 | 24 | } | 25 | } |
1396 | 25 | 26 | ||
1397 | === modified file 'provider/openstack/live_test.go' | |||
1398 | --- provider/openstack/live_test.go 2013-09-18 07:13:09 +0000 | |||
1399 | +++ provider/openstack/live_test.go 2013-09-20 02:56:01 +0000 | |||
1400 | @@ -18,6 +18,7 @@ | |||
1401 | 18 | envtesting "launchpad.net/juju-core/environs/testing" | 18 | envtesting "launchpad.net/juju-core/environs/testing" |
1402 | 19 | "launchpad.net/juju-core/provider/openstack" | 19 | "launchpad.net/juju-core/provider/openstack" |
1403 | 20 | coretesting "launchpad.net/juju-core/testing" | 20 | coretesting "launchpad.net/juju-core/testing" |
1404 | 21 | "launchpad.net/juju-core/testing/testbase" | ||
1405 | 21 | ) | 22 | ) |
1406 | 22 | 23 | ||
1407 | 23 | // generate a different bucket name for each config instance, so that | 24 | // generate a different bucket name for each config instance, so that |
1408 | @@ -72,7 +73,7 @@ | |||
1409 | 72 | // The deployment can be a real live instance or service doubles. | 73 | // The deployment can be a real live instance or service doubles. |
1410 | 73 | // Each test runs using the same connection. | 74 | // Each test runs using the same connection. |
1411 | 74 | type LiveTests struct { | 75 | type LiveTests struct { |
1413 | 75 | coretesting.LoggingSuite | 76 | testbase.LoggingSuite |
1414 | 76 | jujutest.LiveTests | 77 | jujutest.LiveTests |
1415 | 77 | cred *identity.Credentials | 78 | cred *identity.Credentials |
1416 | 78 | writeablePublicStorage storage.Storage | 79 | writeablePublicStorage storage.Storage |
1417 | 79 | 80 | ||
1418 | === modified file 'provider/openstack/local_test.go' | |||
1419 | --- provider/openstack/local_test.go 2013-09-18 22:54:32 +0000 | |||
1420 | +++ provider/openstack/local_test.go 2013-09-20 02:56:01 +0000 | |||
1421 | @@ -33,6 +33,7 @@ | |||
1422 | 33 | "launchpad.net/juju-core/provider/openstack" | 33 | "launchpad.net/juju-core/provider/openstack" |
1423 | 34 | coretesting "launchpad.net/juju-core/testing" | 34 | coretesting "launchpad.net/juju-core/testing" |
1424 | 35 | jc "launchpad.net/juju-core/testing/checkers" | 35 | jc "launchpad.net/juju-core/testing/checkers" |
1425 | 36 | "launchpad.net/juju-core/testing/testbase" | ||
1426 | 36 | "launchpad.net/juju-core/version" | 37 | "launchpad.net/juju-core/version" |
1427 | 37 | ) | 38 | ) |
1428 | 38 | 39 | ||
1429 | @@ -149,7 +150,7 @@ | |||
1430 | 149 | 150 | ||
1431 | 150 | // localLiveSuite runs tests from LiveTests using an Openstack service double. | 151 | // localLiveSuite runs tests from LiveTests using an Openstack service double. |
1432 | 151 | type localLiveSuite struct { | 152 | type localLiveSuite struct { |
1434 | 152 | coretesting.LoggingSuite | 153 | testbase.LoggingSuite |
1435 | 153 | LiveTests | 154 | LiveTests |
1436 | 154 | srv localServer | 155 | srv localServer |
1437 | 155 | } | 156 | } |
1438 | @@ -184,7 +185,7 @@ | |||
1439 | 184 | // to test on a live Openstack server. The service double is started and stopped for | 185 | // to test on a live Openstack server. The service double is started and stopped for |
1440 | 185 | // each test. | 186 | // each test. |
1441 | 186 | type localServerSuite struct { | 187 | type localServerSuite struct { |
1443 | 187 | coretesting.LoggingSuite | 188 | testbase.LoggingSuite |
1444 | 188 | jujutest.Tests | 189 | jujutest.Tests |
1445 | 189 | cred *identity.Credentials | 190 | cred *identity.Credentials |
1446 | 190 | srv localServer | 191 | srv localServer |
1447 | 191 | 192 | ||
1448 | === modified file 'provider/state_test.go' | |||
1449 | --- provider/state_test.go 2013-09-19 00:22:15 +0000 | |||
1450 | +++ provider/state_test.go 2013-09-20 02:56:01 +0000 | |||
1451 | @@ -18,10 +18,11 @@ | |||
1452 | 18 | "launchpad.net/juju-core/provider" | 18 | "launchpad.net/juju-core/provider" |
1453 | 19 | "launchpad.net/juju-core/testing" | 19 | "launchpad.net/juju-core/testing" |
1454 | 20 | jc "launchpad.net/juju-core/testing/checkers" | 20 | jc "launchpad.net/juju-core/testing/checkers" |
1455 | 21 | "launchpad.net/juju-core/testing/testbase" | ||
1456 | 21 | ) | 22 | ) |
1457 | 22 | 23 | ||
1458 | 23 | type StateSuite struct { | 24 | type StateSuite struct { |
1460 | 24 | testing.LoggingSuite | 25 | testbase.LoggingSuite |
1461 | 25 | } | 26 | } |
1462 | 26 | 27 | ||
1463 | 27 | var _ = gc.Suite(&StateSuite{}) | 28 | var _ = gc.Suite(&StateSuite{}) |
1464 | 28 | 29 | ||
1465 | === modified file 'rpc/jsoncodec/codec_test.go' | |||
1466 | --- rpc/jsoncodec/codec_test.go 2013-09-13 14:48:13 +0000 | |||
1467 | +++ rpc/jsoncodec/codec_test.go 2013-09-20 02:56:01 +0000 | |||
1468 | @@ -12,11 +12,11 @@ | |||
1469 | 12 | 12 | ||
1470 | 13 | "launchpad.net/juju-core/rpc" | 13 | "launchpad.net/juju-core/rpc" |
1471 | 14 | "launchpad.net/juju-core/rpc/jsoncodec" | 14 | "launchpad.net/juju-core/rpc/jsoncodec" |
1473 | 15 | "launchpad.net/juju-core/testing" | 15 | "launchpad.net/juju-core/testing/testbase" |
1474 | 16 | ) | 16 | ) |
1475 | 17 | 17 | ||
1476 | 18 | type suite struct { | 18 | type suite struct { |
1478 | 19 | testing.LoggingSuite | 19 | testbase.LoggingSuite |
1479 | 20 | } | 20 | } |
1480 | 21 | 21 | ||
1481 | 22 | var _ = gc.Suite(&suite{}) | 22 | var _ = gc.Suite(&suite{}) |
1482 | 23 | 23 | ||
1483 | === modified file 'rpc/rpc_test.go' | |||
1484 | --- rpc/rpc_test.go 2013-09-13 06:42:24 +0000 | |||
1485 | +++ rpc/rpc_test.go 2013-09-20 02:56:01 +0000 | |||
1486 | @@ -17,11 +17,11 @@ | |||
1487 | 17 | "launchpad.net/juju-core/log" | 17 | "launchpad.net/juju-core/log" |
1488 | 18 | "launchpad.net/juju-core/rpc" | 18 | "launchpad.net/juju-core/rpc" |
1489 | 19 | "launchpad.net/juju-core/rpc/jsoncodec" | 19 | "launchpad.net/juju-core/rpc/jsoncodec" |
1491 | 20 | "launchpad.net/juju-core/testing" | 20 | "launchpad.net/juju-core/testing/testbase" |
1492 | 21 | ) | 21 | ) |
1493 | 22 | 22 | ||
1494 | 23 | type suite struct { | 23 | type suite struct { |
1496 | 24 | testing.LoggingSuite | 24 | testbase.LoggingSuite |
1497 | 25 | } | 25 | } |
1498 | 26 | 26 | ||
1499 | 27 | var _ = gc.Suite(&suite{}) | 27 | var _ = gc.Suite(&suite{}) |
1500 | 28 | 28 | ||
1501 | === modified file 'state/apiserver/common/errors_test.go' | |||
1502 | --- state/apiserver/common/errors_test.go 2013-09-18 15:02:31 +0000 | |||
1503 | +++ state/apiserver/common/errors_test.go 2013-09-20 02:56:01 +0000 | |||
1504 | @@ -12,12 +12,12 @@ | |||
1505 | 12 | "launchpad.net/juju-core/state" | 12 | "launchpad.net/juju-core/state" |
1506 | 13 | "launchpad.net/juju-core/state/api/params" | 13 | "launchpad.net/juju-core/state/api/params" |
1507 | 14 | "launchpad.net/juju-core/state/apiserver/common" | 14 | "launchpad.net/juju-core/state/apiserver/common" |
1508 | 15 | "launchpad.net/juju-core/testing" | ||
1509 | 16 | jc "launchpad.net/juju-core/testing/checkers" | 15 | jc "launchpad.net/juju-core/testing/checkers" |
1510 | 16 | "launchpad.net/juju-core/testing/testbase" | ||
1511 | 17 | ) | 17 | ) |
1512 | 18 | 18 | ||
1513 | 19 | type errorsSuite struct { | 19 | type errorsSuite struct { |
1515 | 20 | testing.LoggingSuite | 20 | testbase.LoggingSuite |
1516 | 21 | } | 21 | } |
1517 | 22 | 22 | ||
1518 | 23 | var _ = gc.Suite(&errorsSuite{}) | 23 | var _ = gc.Suite(&errorsSuite{}) |
1519 | 24 | 24 | ||
1520 | === modified file 'state/conn_test.go' | |||
1521 | --- state/conn_test.go 2013-08-19 11:20:02 +0000 | |||
1522 | +++ state/conn_test.go 2013-09-20 02:56:01 +0000 | |||
1523 | @@ -11,6 +11,7 @@ | |||
1524 | 11 | 11 | ||
1525 | 12 | "launchpad.net/juju-core/state" | 12 | "launchpad.net/juju-core/state" |
1526 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing" |
1527 | 14 | "launchpad.net/juju-core/testing/testbase" | ||
1528 | 14 | ) | 15 | ) |
1529 | 15 | 16 | ||
1530 | 16 | // TestPackage integrates the tests into gotest. | 17 | // TestPackage integrates the tests into gotest. |
1531 | @@ -22,7 +23,7 @@ | |||
1532 | 22 | // test suites (StateSuite, CharmSuite, MachineSuite, etc). | 23 | // test suites (StateSuite, CharmSuite, MachineSuite, etc). |
1533 | 23 | type ConnSuite struct { | 24 | type ConnSuite struct { |
1534 | 24 | testing.MgoSuite | 25 | testing.MgoSuite |
1536 | 25 | testing.LoggingSuite | 26 | testbase.LoggingSuite |
1537 | 26 | annotations *mgo.Collection | 27 | annotations *mgo.Collection |
1538 | 27 | charms *mgo.Collection | 28 | charms *mgo.Collection |
1539 | 28 | machines *mgo.Collection | 29 | machines *mgo.Collection |
1540 | 29 | 30 | ||
1541 | === modified file 'state/initialize_test.go' | |||
1542 | --- state/initialize_test.go 2013-09-13 14:48:13 +0000 | |||
1543 | +++ state/initialize_test.go 2013-09-20 02:56:01 +0000 | |||
1544 | @@ -12,11 +12,12 @@ | |||
1545 | 12 | "launchpad.net/juju-core/state" | 12 | "launchpad.net/juju-core/state" |
1546 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing" |
1547 | 14 | jc "launchpad.net/juju-core/testing/checkers" | 14 | jc "launchpad.net/juju-core/testing/checkers" |
1548 | 15 | "launchpad.net/juju-core/testing/testbase" | ||
1549 | 15 | ) | 16 | ) |
1550 | 16 | 17 | ||
1551 | 17 | type InitializeSuite struct { | 18 | type InitializeSuite struct { |
1552 | 18 | testing.MgoSuite | 19 | testing.MgoSuite |
1554 | 19 | testing.LoggingSuite | 20 | testbase.LoggingSuite |
1555 | 20 | State *state.State | 21 | State *state.State |
1556 | 21 | } | 22 | } |
1557 | 22 | 23 | ||
1558 | 23 | 24 | ||
1559 | === modified file 'state/megawatcher_internal_test.go' | |||
1560 | --- state/megawatcher_internal_test.go 2013-09-13 10:58:13 +0000 | |||
1561 | +++ state/megawatcher_internal_test.go 2013-09-20 02:56:01 +0000 | |||
1562 | @@ -20,6 +20,7 @@ | |||
1563 | 20 | "launchpad.net/juju-core/state/multiwatcher" | 20 | "launchpad.net/juju-core/state/multiwatcher" |
1564 | 21 | "launchpad.net/juju-core/state/watcher" | 21 | "launchpad.net/juju-core/state/watcher" |
1565 | 22 | "launchpad.net/juju-core/testing" | 22 | "launchpad.net/juju-core/testing" |
1566 | 23 | "launchpad.net/juju-core/testing/testbase" | ||
1567 | 23 | ) | 24 | ) |
1568 | 24 | 25 | ||
1569 | 25 | var dottedConfig = ` | 26 | var dottedConfig = ` |
1570 | @@ -28,7 +29,7 @@ | |||
1571 | 28 | ` | 29 | ` |
1572 | 29 | 30 | ||
1573 | 30 | type storeManagerStateSuite struct { | 31 | type storeManagerStateSuite struct { |
1575 | 31 | testing.LoggingSuite | 32 | testbase.LoggingSuite |
1576 | 32 | testing.MgoSuite | 33 | testing.MgoSuite |
1577 | 33 | State *State | 34 | State *State |
1578 | 34 | } | 35 | } |
1579 | 35 | 36 | ||
1580 | === modified file 'state/multiwatcher/multiwatcher_internal_test.go' | |||
1581 | --- state/multiwatcher/multiwatcher_internal_test.go 2013-09-13 14:48:13 +0000 | |||
1582 | +++ state/multiwatcher/multiwatcher_internal_test.go 2013-09-20 02:56:01 +0000 | |||
1583 | @@ -16,7 +16,7 @@ | |||
1584 | 16 | 16 | ||
1585 | 17 | "launchpad.net/juju-core/state/api/params" | 17 | "launchpad.net/juju-core/state/api/params" |
1586 | 18 | "launchpad.net/juju-core/state/watcher" | 18 | "launchpad.net/juju-core/state/watcher" |
1588 | 19 | "launchpad.net/juju-core/testing" | 19 | "launchpad.net/juju-core/testing/testbase" |
1589 | 20 | ) | 20 | ) |
1590 | 21 | 21 | ||
1591 | 22 | func Test(t *stdtesting.T) { | 22 | func Test(t *stdtesting.T) { |
1592 | @@ -24,7 +24,7 @@ | |||
1593 | 24 | } | 24 | } |
1594 | 25 | 25 | ||
1595 | 26 | type storeSuite struct { | 26 | type storeSuite struct { |
1597 | 27 | testing.LoggingSuite | 27 | testbase.LoggingSuite |
1598 | 28 | } | 28 | } |
1599 | 29 | 29 | ||
1600 | 30 | var _ = gc.Suite(&storeSuite{}) | 30 | var _ = gc.Suite(&storeSuite{}) |
1601 | @@ -270,7 +270,7 @@ | |||
1602 | 270 | } | 270 | } |
1603 | 271 | 271 | ||
1604 | 272 | type storeManagerSuite struct { | 272 | type storeManagerSuite struct { |
1606 | 273 | testing.LoggingSuite | 273 | testbase.LoggingSuite |
1607 | 274 | } | 274 | } |
1608 | 275 | 275 | ||
1609 | 276 | var _ = gc.Suite(&storeManagerSuite{}) | 276 | var _ = gc.Suite(&storeManagerSuite{}) |
1610 | 277 | 277 | ||
1611 | === modified file 'state/presence/presence_test.go' | |||
1612 | --- state/presence/presence_test.go 2013-09-13 14:48:13 +0000 | |||
1613 | +++ state/presence/presence_test.go 2013-09-20 02:56:01 +0000 | |||
1614 | @@ -14,6 +14,7 @@ | |||
1615 | 14 | 14 | ||
1616 | 15 | "launchpad.net/juju-core/state/presence" | 15 | "launchpad.net/juju-core/state/presence" |
1617 | 16 | "launchpad.net/juju-core/testing" | 16 | "launchpad.net/juju-core/testing" |
1618 | 17 | "launchpad.net/juju-core/testing/testbase" | ||
1619 | 17 | ) | 18 | ) |
1620 | 18 | 19 | ||
1621 | 19 | func TestPackage(t *stdtesting.T) { | 20 | func TestPackage(t *stdtesting.T) { |
1622 | @@ -22,7 +23,7 @@ | |||
1623 | 22 | 23 | ||
1624 | 23 | type PresenceSuite struct { | 24 | type PresenceSuite struct { |
1625 | 24 | testing.MgoSuite | 25 | testing.MgoSuite |
1627 | 25 | testing.LoggingSuite | 26 | testbase.LoggingSuite |
1628 | 26 | presence *mgo.Collection | 27 | presence *mgo.Collection |
1629 | 27 | pings *mgo.Collection | 28 | pings *mgo.Collection |
1630 | 28 | } | 29 | } |
1631 | 29 | 30 | ||
1632 | === modified file 'state/settings_test.go' | |||
1633 | --- state/settings_test.go 2013-09-13 14:48:13 +0000 | |||
1634 | +++ state/settings_test.go 2013-09-20 02:56:01 +0000 | |||
1635 | @@ -12,10 +12,11 @@ | |||
1636 | 12 | "launchpad.net/juju-core/errors" | 12 | "launchpad.net/juju-core/errors" |
1637 | 13 | "launchpad.net/juju-core/testing" | 13 | "launchpad.net/juju-core/testing" |
1638 | 14 | jc "launchpad.net/juju-core/testing/checkers" | 14 | jc "launchpad.net/juju-core/testing/checkers" |
1639 | 15 | "launchpad.net/juju-core/testing/testbase" | ||
1640 | 15 | ) | 16 | ) |
1641 | 16 | 17 | ||
1642 | 17 | type SettingsSuite struct { | 18 | type SettingsSuite struct { |
1644 | 18 | testing.LoggingSuite | 19 | testbase.LoggingSuite |
1645 | 19 | testing.MgoSuite | 20 | testing.MgoSuite |
1646 | 20 | state *State | 21 | state *State |
1647 | 21 | key string | 22 | key string |
1648 | 22 | 23 | ||
1649 | === modified file 'state/watcher/watcher_test.go' | |||
1650 | --- state/watcher/watcher_test.go 2013-09-13 14:48:13 +0000 | |||
1651 | +++ state/watcher/watcher_test.go 2013-09-20 02:56:01 +0000 | |||
1652 | @@ -14,6 +14,7 @@ | |||
1653 | 14 | 14 | ||
1654 | 15 | "launchpad.net/juju-core/state/watcher" | 15 | "launchpad.net/juju-core/state/watcher" |
1655 | 16 | "launchpad.net/juju-core/testing" | 16 | "launchpad.net/juju-core/testing" |
1656 | 17 | "launchpad.net/juju-core/testing/testbase" | ||
1657 | 17 | ) | 18 | ) |
1658 | 18 | 19 | ||
1659 | 19 | // Test tuning parameters. | 20 | // Test tuning parameters. |
1660 | @@ -46,7 +47,7 @@ | |||
1661 | 46 | 47 | ||
1662 | 47 | type watcherSuite struct { | 48 | type watcherSuite struct { |
1663 | 48 | testing.MgoSuite | 49 | testing.MgoSuite |
1665 | 49 | testing.LoggingSuite | 50 | testbase.LoggingSuite |
1666 | 50 | 51 | ||
1667 | 51 | log *mgo.Collection | 52 | log *mgo.Collection |
1668 | 52 | stash *mgo.Collection | 53 | stash *mgo.Collection |
1669 | 53 | 54 | ||
1670 | === modified file 'store/store_test.go' | |||
1671 | --- store/store_test.go 2013-08-19 11:20:02 +0000 | |||
1672 | +++ store/store_test.go 2013-09-20 02:56:01 +0000 | |||
1673 | @@ -18,6 +18,7 @@ | |||
1674 | 18 | "launchpad.net/juju-core/charm" | 18 | "launchpad.net/juju-core/charm" |
1675 | 19 | "launchpad.net/juju-core/store" | 19 | "launchpad.net/juju-core/store" |
1676 | 20 | "launchpad.net/juju-core/testing" | 20 | "launchpad.net/juju-core/testing" |
1677 | 21 | "launchpad.net/juju-core/testing/testbase" | ||
1678 | 21 | ) | 22 | ) |
1679 | 22 | 23 | ||
1680 | 23 | func Test(t *stdtesting.T) { | 24 | func Test(t *stdtesting.T) { |
1681 | @@ -30,7 +31,7 @@ | |||
1682 | 30 | type StoreSuite struct { | 31 | type StoreSuite struct { |
1683 | 31 | MgoSuite | 32 | MgoSuite |
1684 | 32 | testing.HTTPSuite | 33 | testing.HTTPSuite |
1686 | 33 | testing.LoggingSuite | 34 | testbase.LoggingSuite |
1687 | 34 | store *store.Store | 35 | store *store.Store |
1688 | 35 | } | 36 | } |
1689 | 36 | 37 | ||
1690 | 37 | 38 | ||
1691 | === modified file 'testing/mgo_test.go' | |||
1692 | --- testing/mgo_test.go 2013-08-19 11:20:02 +0000 | |||
1693 | +++ testing/mgo_test.go 2013-09-20 02:56:01 +0000 | |||
1694 | @@ -10,10 +10,11 @@ | |||
1695 | 10 | gc "launchpad.net/gocheck" | 10 | gc "launchpad.net/gocheck" |
1696 | 11 | 11 | ||
1697 | 12 | "launchpad.net/juju-core/testing" | 12 | "launchpad.net/juju-core/testing" |
1698 | 13 | "launchpad.net/juju-core/testing/testbase" | ||
1699 | 13 | ) | 14 | ) |
1700 | 14 | 15 | ||
1701 | 15 | type mgoSuite struct { | 16 | type mgoSuite struct { |
1703 | 16 | testing.LoggingSuite | 17 | testbase.LoggingSuite |
1704 | 17 | testing.MgoSuite | 18 | testing.MgoSuite |
1705 | 18 | } | 19 | } |
1706 | 19 | 20 | ||
1707 | 20 | 21 | ||
1708 | === added directory 'testing/testbase' | |||
1709 | === renamed file 'testing/cleanup.go' => 'testing/testbase/cleanup.go' | |||
1710 | --- testing/cleanup.go 2013-09-19 02:41:40 +0000 | |||
1711 | +++ testing/testbase/cleanup.go 2013-09-20 02:56:01 +0000 | |||
1712 | @@ -1,7 +1,7 @@ | |||
1713 | 1 | // Copyright 2013 Canonical Ltd. | 1 | // Copyright 2013 Canonical Ltd. |
1714 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | 2 | // Licensed under the AGPLv3, see LICENCE file for details. |
1715 | 3 | 3 | ||
1717 | 4 | package testing | 4 | package testbase |
1718 | 5 | 5 | ||
1719 | 6 | import ( | 6 | import ( |
1720 | 7 | gc "launchpad.net/gocheck" | 7 | gc "launchpad.net/gocheck" |
1721 | 8 | 8 | ||
1722 | === renamed file 'testing/cleanup_test.go' => 'testing/testbase/cleanup_test.go' | |||
1723 | --- testing/cleanup_test.go 2013-09-19 11:37:54 +0000 | |||
1724 | +++ testing/testbase/cleanup_test.go 2013-09-20 02:56:01 +0000 | |||
1725 | @@ -1,15 +1,18 @@ | |||
1727 | 1 | package testing_test | 1 | // Copyright 2013 Canonical Ltd. |
1728 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | ||
1729 | 3 | |||
1730 | 4 | package testbase_test | ||
1731 | 2 | 5 | ||
1732 | 3 | import ( | 6 | import ( |
1733 | 4 | "os" | 7 | "os" |
1734 | 5 | 8 | ||
1735 | 6 | gc "launchpad.net/gocheck" | 9 | gc "launchpad.net/gocheck" |
1736 | 7 | 10 | ||
1738 | 8 | "launchpad.net/juju-core/testing" | 11 | "launchpad.net/juju-core/testing/testbase" |
1739 | 9 | ) | 12 | ) |
1740 | 10 | 13 | ||
1741 | 11 | type cleanupSuite struct { | 14 | type cleanupSuite struct { |
1743 | 12 | testing.CleanupSuite | 15 | testbase.CleanupSuite |
1744 | 13 | } | 16 | } |
1745 | 14 | 17 | ||
1746 | 15 | var _ = gc.Suite(&cleanupSuite{}) | 18 | var _ = gc.Suite(&cleanupSuite{}) |
1747 | 16 | 19 | ||
1748 | === renamed file 'testing/imports.go' => 'testing/testbase/imports.go' | |||
1749 | --- testing/imports.go 2013-07-23 21:11:51 +0000 | |||
1750 | +++ testing/testbase/imports.go 2013-09-20 02:56:01 +0000 | |||
1751 | @@ -1,7 +1,7 @@ | |||
1752 | 1 | // Copyright 2013 Canonical Ltd. | 1 | // Copyright 2013 Canonical Ltd. |
1753 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | 2 | // Licensed under the AGPLv3, see LICENCE file for details. |
1754 | 3 | 3 | ||
1756 | 4 | package testing | 4 | package testbase |
1757 | 5 | 5 | ||
1758 | 6 | import ( | 6 | import ( |
1759 | 7 | "go/build" | 7 | "go/build" |
1760 | 8 | 8 | ||
1761 | === renamed file 'testing/log.go' => 'testing/testbase/log.go' | |||
1762 | --- testing/log.go 2013-09-17 02:46:26 +0000 | |||
1763 | +++ testing/testbase/log.go 2013-09-20 02:56:01 +0000 | |||
1764 | @@ -1,7 +1,7 @@ | |||
1765 | 1 | // Copyright 2012, 2013 Canonical Ltd. | 1 | // Copyright 2012, 2013 Canonical Ltd. |
1766 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | 2 | // Licensed under the AGPLv3, see LICENCE file for details. |
1767 | 3 | 3 | ||
1769 | 4 | package testing | 4 | package testbase |
1770 | 5 | 5 | ||
1771 | 6 | import ( | 6 | import ( |
1772 | 7 | "fmt" | 7 | "fmt" |
1773 | 8 | 8 | ||
1774 | === renamed file 'testing/log_test.go' => 'testing/testbase/log_test.go' | |||
1775 | --- testing/log_test.go 2013-09-13 14:48:13 +0000 | |||
1776 | +++ testing/testbase/log_test.go 2013-09-20 02:56:01 +0000 | |||
1777 | @@ -1,16 +1,19 @@ | |||
1779 | 1 | package testing_test | 1 | // Copyright 2013 Canonical Ltd. |
1780 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | ||
1781 | 3 | |||
1782 | 4 | package testbase_test | ||
1783 | 2 | 5 | ||
1784 | 3 | import ( | 6 | import ( |
1785 | 4 | gc "launchpad.net/gocheck" | 7 | gc "launchpad.net/gocheck" |
1786 | 5 | 8 | ||
1787 | 6 | "launchpad.net/juju-core/log" | 9 | "launchpad.net/juju-core/log" |
1789 | 7 | "launchpad.net/juju-core/testing" | 10 | "launchpad.net/juju-core/testing/testbase" |
1790 | 8 | ) | 11 | ) |
1791 | 9 | 12 | ||
1792 | 10 | var _ = gc.Suite(&logSuite{}) | 13 | var _ = gc.Suite(&logSuite{}) |
1793 | 11 | 14 | ||
1794 | 12 | type logSuite struct { | 15 | type logSuite struct { |
1796 | 13 | testing.LoggingSuite | 16 | testbase.LoggingSuite |
1797 | 14 | } | 17 | } |
1798 | 15 | 18 | ||
1799 | 16 | func (s *logSuite) SetUpSuite(c *gc.C) { | 19 | func (s *logSuite) SetUpSuite(c *gc.C) { |
1800 | 17 | 20 | ||
1801 | === added file 'testing/testbase/package_test.go' | |||
1802 | --- testing/testbase/package_test.go 1970-01-01 00:00:00 +0000 | |||
1803 | +++ testing/testbase/package_test.go 2013-09-20 02:56:01 +0000 | |||
1804 | @@ -0,0 +1,26 @@ | |||
1805 | 1 | // Copyright 2013 Canonical Ltd. | ||
1806 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | ||
1807 | 3 | |||
1808 | 4 | package testbase_test | ||
1809 | 5 | |||
1810 | 6 | import ( | ||
1811 | 7 | "testing" | ||
1812 | 8 | |||
1813 | 9 | gc "launchpad.net/gocheck" | ||
1814 | 10 | |||
1815 | 11 | "launchpad.net/juju-core/testing/testbase" | ||
1816 | 12 | ) | ||
1817 | 13 | |||
1818 | 14 | func Test(t *testing.T) { | ||
1819 | 15 | gc.TestingT(t) | ||
1820 | 16 | } | ||
1821 | 17 | |||
1822 | 18 | type DependencySuite struct{} | ||
1823 | 19 | |||
1824 | 20 | var _ = gc.Suite(&DependencySuite{}) | ||
1825 | 21 | |||
1826 | 22 | func (*DependencySuite) TestPackageDependencies(c *gc.C) { | ||
1827 | 23 | // This test is to ensure we don't bring in any juju-core dependencies. | ||
1828 | 24 | c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/testing/testbase"), | ||
1829 | 25 | gc.HasLen, 0) | ||
1830 | 26 | } | ||
1831 | 0 | 27 | ||
1832 | === renamed file 'testing/patch.go' => 'testing/testbase/patch.go' | |||
1833 | --- testing/patch.go 2013-09-19 02:41:40 +0000 | |||
1834 | +++ testing/testbase/patch.go 2013-09-20 02:56:01 +0000 | |||
1835 | @@ -1,4 +1,7 @@ | |||
1837 | 1 | package testing | 1 | // Copyright 2013 Canonical Ltd. |
1838 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | ||
1839 | 3 | |||
1840 | 4 | package testbase | ||
1841 | 2 | 5 | ||
1842 | 3 | import ( | 6 | import ( |
1843 | 4 | "os" | 7 | "os" |
1844 | 5 | 8 | ||
1845 | === renamed file 'testing/patch_test.go' => 'testing/testbase/patch_test.go' | |||
1846 | --- testing/patch_test.go 2013-09-19 02:41:40 +0000 | |||
1847 | +++ testing/testbase/patch_test.go 2013-09-20 02:56:01 +0000 | |||
1848 | @@ -1,4 +1,7 @@ | |||
1850 | 1 | package testing_test | 1 | // Copyright 2013 Canonical Ltd. |
1851 | 2 | // Licensed under the AGPLv3, see LICENCE file for details. | ||
1852 | 3 | |||
1853 | 4 | package testbase_test | ||
1854 | 2 | 5 | ||
1855 | 3 | import ( | 6 | import ( |
1856 | 4 | "errors" | 7 | "errors" |
1857 | @@ -6,7 +9,7 @@ | |||
1858 | 6 | 9 | ||
1859 | 7 | gc "launchpad.net/gocheck" | 10 | gc "launchpad.net/gocheck" |
1860 | 8 | 11 | ||
1862 | 9 | "launchpad.net/juju-core/testing" | 12 | "launchpad.net/juju-core/testing/testbase" |
1863 | 10 | ) | 13 | ) |
1864 | 11 | 14 | ||
1865 | 12 | type PatchValueSuite struct{} | 15 | type PatchValueSuite struct{} |
1866 | @@ -15,7 +18,7 @@ | |||
1867 | 15 | 18 | ||
1868 | 16 | func (*PatchValueSuite) TestSetInt(c *gc.C) { | 19 | func (*PatchValueSuite) TestSetInt(c *gc.C) { |
1869 | 17 | i := 99 | 20 | i := 99 |
1871 | 18 | restore := testing.PatchValue(&i, 88) | 21 | restore := testbase.PatchValue(&i, 88) |
1872 | 19 | c.Assert(i, gc.Equals, 88) | 22 | c.Assert(i, gc.Equals, 88) |
1873 | 20 | restore() | 23 | restore() |
1874 | 21 | c.Assert(i, gc.Equals, 99) | 24 | c.Assert(i, gc.Equals, 99) |
1875 | @@ -25,7 +28,7 @@ | |||
1876 | 25 | oldErr := errors.New("foo") | 28 | oldErr := errors.New("foo") |
1877 | 26 | newErr := errors.New("bar") | 29 | newErr := errors.New("bar") |
1878 | 27 | err := oldErr | 30 | err := oldErr |
1880 | 28 | restore := testing.PatchValue(&err, newErr) | 31 | restore := testbase.PatchValue(&err, newErr) |
1881 | 29 | c.Assert(err, gc.Equals, newErr) | 32 | c.Assert(err, gc.Equals, newErr) |
1882 | 30 | restore() | 33 | restore() |
1883 | 31 | c.Assert(err, gc.Equals, oldErr) | 34 | c.Assert(err, gc.Equals, oldErr) |
1884 | @@ -34,7 +37,7 @@ | |||
1885 | 34 | func (*PatchValueSuite) TestSetErrorToNil(c *gc.C) { | 37 | func (*PatchValueSuite) TestSetErrorToNil(c *gc.C) { |
1886 | 35 | oldErr := errors.New("foo") | 38 | oldErr := errors.New("foo") |
1887 | 36 | err := oldErr | 39 | err := oldErr |
1889 | 37 | restore := testing.PatchValue(&err, nil) | 40 | restore := testbase.PatchValue(&err, nil) |
1890 | 38 | c.Assert(err, gc.Equals, nil) | 41 | c.Assert(err, gc.Equals, nil) |
1891 | 39 | restore() | 42 | restore() |
1892 | 40 | c.Assert(err, gc.Equals, oldErr) | 43 | c.Assert(err, gc.Equals, oldErr) |
1893 | @@ -43,7 +46,7 @@ | |||
1894 | 43 | func (*PatchValueSuite) TestSetMapToNil(c *gc.C) { | 46 | func (*PatchValueSuite) TestSetMapToNil(c *gc.C) { |
1895 | 44 | oldMap := map[string]int{"foo": 1234} | 47 | oldMap := map[string]int{"foo": 1234} |
1896 | 45 | m := oldMap | 48 | m := oldMap |
1898 | 46 | restore := testing.PatchValue(&m, nil) | 49 | restore := testbase.PatchValue(&m, nil) |
1899 | 47 | c.Assert(m, gc.IsNil) | 50 | c.Assert(m, gc.IsNil) |
1900 | 48 | restore() | 51 | restore() |
1901 | 49 | c.Assert(m, gc.DeepEquals, oldMap) | 52 | c.Assert(m, gc.DeepEquals, oldMap) |
1902 | @@ -52,7 +55,7 @@ | |||
1903 | 52 | func (*PatchValueSuite) TestSetPanicsWhenNotAssignable(c *gc.C) { | 55 | func (*PatchValueSuite) TestSetPanicsWhenNotAssignable(c *gc.C) { |
1904 | 53 | i := 99 | 56 | i := 99 |
1905 | 54 | type otherInt int | 57 | type otherInt int |
1907 | 55 | c.Assert(func() { testing.PatchValue(&i, otherInt(88)) }, gc.PanicMatches, `reflect\.Set: value of type testing_test\.otherInt is not assignable to type int`) | 58 | c.Assert(func() { testbase.PatchValue(&i, otherInt(88)) }, gc.PanicMatches, `reflect\.Set: value of type testbase_test\.otherInt is not assignable to type int`) |
1908 | 56 | } | 59 | } |
1909 | 57 | 60 | ||
1910 | 58 | type PatchEnvironmentSuite struct{} | 61 | type PatchEnvironmentSuite struct{} |
1911 | @@ -64,7 +67,7 @@ | |||
1912 | 64 | // remember the old value, and set it to something we can check | 67 | // remember the old value, and set it to something we can check |
1913 | 65 | oldValue := os.Getenv(envName) | 68 | oldValue := os.Getenv(envName) |
1914 | 66 | os.Setenv(envName, "initial") | 69 | os.Setenv(envName, "initial") |
1916 | 67 | restore := testing.PatchEnvironment(envName, "new value") | 70 | restore := testbase.PatchEnvironment(envName, "new value") |
1917 | 68 | // Using check to make sure the environment gets set back properly in the test. | 71 | // Using check to make sure the environment gets set back properly in the test. |
1918 | 69 | c.Check(os.Getenv(envName), gc.Equals, "new value") | 72 | c.Check(os.Getenv(envName), gc.Equals, "new value") |
1919 | 70 | restore() | 73 | restore() |
1920 | 71 | 74 | ||
1921 | === modified file 'utils/fslock/fslock_test.go' | |||
1922 | --- utils/fslock/fslock_test.go 2013-09-13 14:48:13 +0000 | |||
1923 | +++ utils/fslock/fslock_test.go 2013-09-20 02:56:01 +0000 | |||
1924 | @@ -17,6 +17,7 @@ | |||
1925 | 17 | "launchpad.net/tomb" | 17 | "launchpad.net/tomb" |
1926 | 18 | 18 | ||
1927 | 19 | coretesting "launchpad.net/juju-core/testing" | 19 | coretesting "launchpad.net/juju-core/testing" |
1928 | 20 | "launchpad.net/juju-core/testing/testbase" | ||
1929 | 20 | "launchpad.net/juju-core/utils/fslock" | 21 | "launchpad.net/juju-core/utils/fslock" |
1930 | 21 | ) | 22 | ) |
1931 | 22 | 23 | ||
1932 | @@ -25,7 +26,7 @@ | |||
1933 | 25 | } | 26 | } |
1934 | 26 | 27 | ||
1935 | 27 | type fslockSuite struct { | 28 | type fslockSuite struct { |
1937 | 28 | coretesting.LoggingSuite | 29 | testbase.LoggingSuite |
1938 | 29 | lockDelay time.Duration | 30 | lockDelay time.Duration |
1939 | 30 | } | 31 | } |
1940 | 31 | 32 | ||
1941 | 32 | 33 | ||
1942 | === modified file 'worker/deployer/simple_test.go' | |||
1943 | --- worker/deployer/simple_test.go 2013-09-13 14:48:13 +0000 | |||
1944 | +++ worker/deployer/simple_test.go 2013-09-20 02:56:01 +0000 | |||
1945 | @@ -19,6 +19,7 @@ | |||
1946 | 19 | "launchpad.net/juju-core/names" | 19 | "launchpad.net/juju-core/names" |
1947 | 20 | "launchpad.net/juju-core/testing" | 20 | "launchpad.net/juju-core/testing" |
1948 | 21 | jc "launchpad.net/juju-core/testing/checkers" | 21 | jc "launchpad.net/juju-core/testing/checkers" |
1949 | 22 | "launchpad.net/juju-core/testing/testbase" | ||
1950 | 22 | "launchpad.net/juju-core/version" | 23 | "launchpad.net/juju-core/version" |
1951 | 23 | "launchpad.net/juju-core/worker/deployer" | 24 | "launchpad.net/juju-core/worker/deployer" |
1952 | 24 | ) | 25 | ) |
1953 | @@ -129,7 +130,7 @@ | |||
1954 | 129 | } | 130 | } |
1955 | 130 | 131 | ||
1956 | 131 | type SimpleToolsFixture struct { | 132 | type SimpleToolsFixture struct { |
1958 | 132 | testing.LoggingSuite | 133 | testbase.LoggingSuite |
1959 | 133 | dataDir string | 134 | dataDir string |
1960 | 134 | initDir string | 135 | initDir string |
1961 | 135 | logDir string | 136 | logDir string |
1962 | 136 | 137 | ||
1963 | === modified file 'worker/notifyworker_test.go' | |||
1964 | --- worker/notifyworker_test.go 2013-08-28 14:03:08 +0000 | |||
1965 | +++ worker/notifyworker_test.go 2013-09-20 02:56:01 +0000 | |||
1966 | @@ -15,11 +15,12 @@ | |||
1967 | 15 | "launchpad.net/juju-core/state/watcher" | 15 | "launchpad.net/juju-core/state/watcher" |
1968 | 16 | coretesting "launchpad.net/juju-core/testing" | 16 | coretesting "launchpad.net/juju-core/testing" |
1969 | 17 | jc "launchpad.net/juju-core/testing/checkers" | 17 | jc "launchpad.net/juju-core/testing/checkers" |
1970 | 18 | "launchpad.net/juju-core/testing/testbase" | ||
1971 | 18 | "launchpad.net/juju-core/worker" | 19 | "launchpad.net/juju-core/worker" |
1972 | 19 | ) | 20 | ) |
1973 | 20 | 21 | ||
1974 | 21 | type notifyWorkerSuite struct { | 22 | type notifyWorkerSuite struct { |
1976 | 22 | coretesting.LoggingSuite | 23 | testbase.LoggingSuite |
1977 | 23 | worker worker.Worker | 24 | worker worker.Worker |
1978 | 24 | actor *notifyHandler | 25 | actor *notifyHandler |
1979 | 25 | } | 26 | } |
1980 | 26 | 27 | ||
1981 | === modified file 'worker/provisioner/lxc-broker_test.go' | |||
1982 | --- worker/provisioner/lxc-broker_test.go 2013-09-19 03:23:04 +0000 | |||
1983 | +++ worker/provisioner/lxc-broker_test.go 2013-09-20 02:56:01 +0000 | |||
1984 | @@ -27,13 +27,14 @@ | |||
1985 | 27 | "launchpad.net/juju-core/state" | 27 | "launchpad.net/juju-core/state" |
1986 | 28 | coretesting "launchpad.net/juju-core/testing" | 28 | coretesting "launchpad.net/juju-core/testing" |
1987 | 29 | jc "launchpad.net/juju-core/testing/checkers" | 29 | jc "launchpad.net/juju-core/testing/checkers" |
1988 | 30 | "launchpad.net/juju-core/testing/testbase" | ||
1989 | 30 | coretools "launchpad.net/juju-core/tools" | 31 | coretools "launchpad.net/juju-core/tools" |
1990 | 31 | "launchpad.net/juju-core/version" | 32 | "launchpad.net/juju-core/version" |
1991 | 32 | "launchpad.net/juju-core/worker/provisioner" | 33 | "launchpad.net/juju-core/worker/provisioner" |
1992 | 33 | ) | 34 | ) |
1993 | 34 | 35 | ||
1994 | 35 | type lxcSuite struct { | 36 | type lxcSuite struct { |
1996 | 36 | coretesting.LoggingSuite | 37 | testbase.LoggingSuite |
1997 | 37 | lxc.TestSuite | 38 | lxc.TestSuite |
1998 | 38 | events chan mock.Event | 39 | events chan mock.Event |
1999 | 39 | } | 40 | } |
2000 | 40 | 41 | ||
2001 | === modified file 'worker/runner_test.go' | |||
2002 | --- worker/runner_test.go 2013-08-19 11:20:02 +0000 | |||
2003 | +++ worker/runner_test.go 2013-09-20 02:56:01 +0000 | |||
2004 | @@ -12,12 +12,12 @@ | |||
2005 | 12 | gc "launchpad.net/gocheck" | 12 | gc "launchpad.net/gocheck" |
2006 | 13 | "launchpad.net/tomb" | 13 | "launchpad.net/tomb" |
2007 | 14 | 14 | ||
2009 | 15 | coretesting "launchpad.net/juju-core/testing" | 15 | "launchpad.net/juju-core/testing/testbase" |
2010 | 16 | "launchpad.net/juju-core/worker" | 16 | "launchpad.net/juju-core/worker" |
2011 | 17 | ) | 17 | ) |
2012 | 18 | 18 | ||
2013 | 19 | type runnerSuite struct { | 19 | type runnerSuite struct { |
2015 | 20 | coretesting.LoggingSuite | 20 | testbase.LoggingSuite |
2016 | 21 | restartDelay time.Duration | 21 | restartDelay time.Duration |
2017 | 22 | } | 22 | } |
2018 | 23 | 23 | ||
2019 | 24 | 24 | ||
2020 | === modified file 'worker/stringsworker_test.go' | |||
2021 | --- worker/stringsworker_test.go 2013-08-28 14:03:08 +0000 | |||
2022 | +++ worker/stringsworker_test.go 2013-09-20 02:56:01 +0000 | |||
2023 | @@ -15,11 +15,12 @@ | |||
2024 | 15 | "launchpad.net/juju-core/state/watcher" | 15 | "launchpad.net/juju-core/state/watcher" |
2025 | 16 | coretesting "launchpad.net/juju-core/testing" | 16 | coretesting "launchpad.net/juju-core/testing" |
2026 | 17 | jc "launchpad.net/juju-core/testing/checkers" | 17 | jc "launchpad.net/juju-core/testing/checkers" |
2027 | 18 | "launchpad.net/juju-core/testing/testbase" | ||
2028 | 18 | "launchpad.net/juju-core/worker" | 19 | "launchpad.net/juju-core/worker" |
2029 | 19 | ) | 20 | ) |
2030 | 20 | 21 | ||
2031 | 21 | type stringsWorkerSuite struct { | 22 | type stringsWorkerSuite struct { |
2033 | 22 | coretesting.LoggingSuite | 23 | testbase.LoggingSuite |
2034 | 23 | worker worker.Worker | 24 | worker worker.Worker |
2035 | 24 | actor *stringsHandler | 25 | actor *stringsHandler |
2036 | 25 | } | 26 | } |
2037 | 26 | 27 | ||
2038 | === modified file 'worker/uniter/charm/git_test.go' | |||
2039 | --- worker/uniter/charm/git_test.go 2013-09-19 02:17:33 +0000 | |||
2040 | +++ worker/uniter/charm/git_test.go 2013-09-20 02:56:01 +0000 | |||
2041 | @@ -14,6 +14,7 @@ | |||
2042 | 14 | corecharm "launchpad.net/juju-core/charm" | 14 | corecharm "launchpad.net/juju-core/charm" |
2043 | 15 | "launchpad.net/juju-core/testing" | 15 | "launchpad.net/juju-core/testing" |
2044 | 16 | jc "launchpad.net/juju-core/testing/checkers" | 16 | jc "launchpad.net/juju-core/testing/checkers" |
2045 | 17 | "launchpad.net/juju-core/testing/testbase" | ||
2046 | 17 | "launchpad.net/juju-core/worker/uniter/charm" | 18 | "launchpad.net/juju-core/worker/uniter/charm" |
2047 | 18 | ) | 19 | ) |
2048 | 19 | 20 | ||
2049 | @@ -21,7 +22,7 @@ | |||
2050 | 21 | 22 | ||
2051 | 22 | type GitDirSuite struct { | 23 | type GitDirSuite struct { |
2052 | 23 | testing.GitSuite | 24 | testing.GitSuite |
2054 | 24 | LoggingSuite testing.LoggingSuite | 25 | LoggingSuite testbase.LoggingSuite |
2055 | 25 | } | 26 | } |
2056 | 26 | 27 | ||
2057 | 27 | var _ = gc.Suite(&GitDirSuite{}) | 28 | var _ = gc.Suite(&GitDirSuite{}) |
2058 | 28 | 29 | ||
2059 | === modified file 'worker/uniter/debug/server_test.go' | |||
2060 | --- worker/uniter/debug/server_test.go 2013-09-19 03:23:04 +0000 | |||
2061 | +++ worker/uniter/debug/server_test.go 2013-09-20 02:56:01 +0000 | |||
2062 | @@ -14,12 +14,12 @@ | |||
2063 | 14 | 14 | ||
2064 | 15 | gc "launchpad.net/gocheck" | 15 | gc "launchpad.net/gocheck" |
2065 | 16 | 16 | ||
2066 | 17 | "launchpad.net/juju-core/testing" | ||
2067 | 18 | jc "launchpad.net/juju-core/testing/checkers" | 17 | jc "launchpad.net/juju-core/testing/checkers" |
2068 | 18 | "launchpad.net/juju-core/testing/testbase" | ||
2069 | 19 | ) | 19 | ) |
2070 | 20 | 20 | ||
2071 | 21 | type DebugHooksServerSuite struct { | 21 | type DebugHooksServerSuite struct { |
2073 | 22 | testing.LoggingSuite | 22 | testbase.LoggingSuite |
2074 | 23 | ctx *HooksContext | 23 | ctx *HooksContext |
2075 | 24 | fakebin string | 24 | fakebin string |
2076 | 25 | tmpdir string | 25 | tmpdir string |
2077 | 26 | 26 | ||
2078 | === modified file 'worker/uniter/jujuc/server_test.go' | |||
2079 | --- worker/uniter/jujuc/server_test.go 2013-09-13 14:48:13 +0000 | |||
2080 | +++ worker/uniter/jujuc/server_test.go 2013-09-20 02:56:01 +0000 | |||
2081 | @@ -19,6 +19,7 @@ | |||
2082 | 19 | "launchpad.net/juju-core/cmd" | 19 | "launchpad.net/juju-core/cmd" |
2083 | 20 | "launchpad.net/juju-core/testing" | 20 | "launchpad.net/juju-core/testing" |
2084 | 21 | jc "launchpad.net/juju-core/testing/checkers" | 21 | jc "launchpad.net/juju-core/testing/checkers" |
2085 | 22 | "launchpad.net/juju-core/testing/testbase" | ||
2086 | 22 | "launchpad.net/juju-core/worker/uniter/jujuc" | 23 | "launchpad.net/juju-core/worker/uniter/jujuc" |
2087 | 23 | ) | 24 | ) |
2088 | 24 | 25 | ||
2089 | @@ -69,7 +70,7 @@ | |||
2090 | 69 | } | 70 | } |
2091 | 70 | 71 | ||
2092 | 71 | type ServerSuite struct { | 72 | type ServerSuite struct { |
2094 | 72 | testing.LoggingSuite | 73 | testbase.LoggingSuite |
2095 | 73 | server *jujuc.Server | 74 | server *jujuc.Server |
2096 | 74 | sockPath string | 75 | sockPath string |
2097 | 75 | err chan error | 76 | err chan error |
Reviewers: mp+186701_ code.launchpad. net,
Message:
Please take a look.
Description:
Add a testbase package with no juju-core deps.
The base cleanup and logging suites are now there,
as are the patch functions.
A test also exists there to make sure that no juju-core
dependencies creep in.
https:/ /code.launchpad .net/~thumper/ juju-core/ testbase/ +merge/ 186701
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/13694046/
Affected files (+253, -174 lines): 1.12_whitebox_ test.go 1.16_whitebox_ test.go whitebox_ test.go diskmanager_ test.go tools_test. go bootstrap_ test.go plugin_ test.go publish_ test.go synctools_ test.go agent_test. go bootstrap_ test.go machine_ test.go lxc/lxc_ test.go downloader_ test.go bootstrap/ bootstrap_ test.go cert_internal_ test.go cert_test. go cloudinit/ cloudinit_ test.go cloudinit_ test.go config/ config_ test.go httpstorage/ backend_ test.go imagemetadata/ validation_ test.go instances/ image_test. go instances/ instancetype_ test.go jujutest/ livetests. go jujutest/ tests.go manual/ detection_ test.go mongo_test. go simplestreams/ testing/ testing. go sshstorage/ storage_ test.go sync/sync_ test.go tools/build_ test.go tools/storage_ test.go tools/tools_ test.go tools/validatio n_test. go address_ test.go test.go package_ test.go vars_linux_ test.go vars_windows_ test.go conn.go azure/azure_ test.go azure/config_ test.go azure/customdat a_test. go ec2/config_ test.go ec2/image_ test.go ec2/live_ test.go ec2/local_ test.go local/environpr ovider_ test.go local/local_ test.go local/prereqs_ test.go maas/config_ test.go maas/maas_ test.go openstack/ config_ test.go openstack/ live_test. go openstack/ local_test. go state_test. go codec_test. go /common/ errors_ test.go e_test. go er_internal_ test.go her/multiwatche r_internal_ test.go presence_ test.go test.go watcher_ test.go testbase/ cleanup. go testbase/ cleanup_ test.go testbase/ imports. go testbase/ log.go testbase/ ...
A [revision details]
M agent/agent_test.go
M agent/format-
M agent/format-
M agent/format_
M agent/tools/
M agent/tools/
M charm/dir_test.go
M charm/repo_test.go
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/jujud/
M cmd/jujud/
M cmd/jujud/
M cmd/logging_test.go
M container/
M downloader/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M instance/
M juju/apiconn_
M juju/conn_test.go
M juju/osenv/
M juju/osenv/
M juju/osenv/
M juju/testing/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M rpc/jsoncodec/
M rpc/rpc_test.go
M state/apiserver
M state/conn_test.go
M state/initializ
M state/megawatch
M state/multiwatc
M state/presence/
M state/settings_
M state/watcher/
M store/store_test.go
M testing/mgo_test.go
M testing/
M testing/
M testing/
M testing/
M testing/