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 | gc "launchpad.net/gocheck" |
6 | |
7 | "launchpad.net/juju-core/agent" |
8 | - coretesting "launchpad.net/juju-core/testing" |
9 | + "launchpad.net/juju-core/testing/testbase" |
10 | ) |
11 | |
12 | type suite struct { |
13 | - coretesting.LoggingSuite |
14 | + testbase.LoggingSuite |
15 | } |
16 | |
17 | var _ = gc.Suite(&suite{}) |
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 | |
24 | gc "launchpad.net/gocheck" |
25 | |
26 | - "launchpad.net/juju-core/testing" |
27 | jc "launchpad.net/juju-core/testing/checkers" |
28 | + "launchpad.net/juju-core/testing/testbase" |
29 | ) |
30 | |
31 | type format_1_12Suite struct { |
32 | - testing.LoggingSuite |
33 | + testbase.LoggingSuite |
34 | formatter formatter_1_12 |
35 | } |
36 | |
37 | |
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 | gc "launchpad.net/gocheck" |
43 | |
44 | "launchpad.net/juju-core/juju/osenv" |
45 | - "launchpad.net/juju-core/testing" |
46 | jc "launchpad.net/juju-core/testing/checkers" |
47 | + "launchpad.net/juju-core/testing/testbase" |
48 | ) |
49 | |
50 | type format_1_16Suite struct { |
51 | - testing.LoggingSuite |
52 | + testbase.LoggingSuite |
53 | formatter formatter_1_16 |
54 | } |
55 | |
56 | |
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 | |
62 | gc "launchpad.net/gocheck" |
63 | |
64 | - "launchpad.net/juju-core/testing" |
65 | + "launchpad.net/juju-core/testing/testbase" |
66 | ) |
67 | |
68 | type formatSuite struct { |
69 | - testing.LoggingSuite |
70 | + testbase.LoggingSuite |
71 | } |
72 | |
73 | var _ = gc.Suite(&formatSuite{}) |
74 | |
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 | |
80 | agenttools "launchpad.net/juju-core/agent/tools" |
81 | coretesting "launchpad.net/juju-core/testing" |
82 | + "launchpad.net/juju-core/testing/testbase" |
83 | coretools "launchpad.net/juju-core/tools" |
84 | "launchpad.net/juju-core/version" |
85 | ) |
86 | @@ -20,7 +21,7 @@ |
87 | var _ agenttools.ToolsManager = (*agenttools.DiskManager)(nil) |
88 | |
89 | type DiskManagerSuite struct { |
90 | - coretesting.LoggingSuite |
91 | + testbase.LoggingSuite |
92 | dataDir string |
93 | manager agenttools.ToolsManager |
94 | } |
95 | |
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 | |
101 | agenttools "launchpad.net/juju-core/agent/tools" |
102 | "launchpad.net/juju-core/testing" |
103 | + "launchpad.net/juju-core/testing/testbase" |
104 | coretest "launchpad.net/juju-core/tools" |
105 | "launchpad.net/juju-core/version" |
106 | ) |
107 | |
108 | type ToolsSuite struct { |
109 | - testing.LoggingSuite |
110 | + testbase.LoggingSuite |
111 | dataDir string |
112 | } |
113 | |
114 | @@ -35,7 +36,7 @@ |
115 | // or any of the other bigger packages that'll drag in yet more dependencies. |
116 | // Only imports that start with "launchpad.net/juju-core" are checked, and the |
117 | // resulting slice has that prefix removed to keep the output short. |
118 | - c.Assert(testing.FindJujuCoreImports(c, "launchpad.net/juju-core/agent/tools"), |
119 | + c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/agent/tools"), |
120 | gc.DeepEquals, |
121 | []string{"tools", "version"}) |
122 | } |
123 | |
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 | |
129 | "launchpad.net/juju-core/charm" |
130 | "launchpad.net/juju-core/testing" |
131 | + "launchpad.net/juju-core/testing/testbase" |
132 | ) |
133 | |
134 | type DirSuite struct { |
135 | - testing.LoggingSuite |
136 | + testbase.LoggingSuite |
137 | } |
138 | |
139 | var _ = gc.Suite(&DirSuite{}) |
140 | |
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 | |
146 | "launchpad.net/juju-core/charm" |
147 | "launchpad.net/juju-core/testing" |
148 | + "launchpad.net/juju-core/testing/testbase" |
149 | ) |
150 | |
151 | type MockStore struct { |
152 | @@ -151,7 +152,7 @@ |
153 | } |
154 | |
155 | type StoreSuite struct { |
156 | - testing.LoggingSuite |
157 | + testbase.LoggingSuite |
158 | server *MockStore |
159 | store *charm.CharmStore |
160 | oldCacheDir string |
161 | @@ -172,7 +173,7 @@ |
162 | s.server.downloads = nil |
163 | } |
164 | |
165 | -// Uses the TearDownTest from testing.LoggingSuite |
166 | +// Uses the TearDownTest from testbase.LoggingSuite |
167 | |
168 | func (s *StoreSuite) TearDownSuite(c *gc.C) { |
169 | charm.CacheDir = s.oldCacheDir |
170 | @@ -392,7 +393,7 @@ |
171 | } |
172 | |
173 | type LocalRepoSuite struct { |
174 | - testing.LoggingSuite |
175 | + testbase.LoggingSuite |
176 | repo *charm.LocalRepository |
177 | seriesPath string |
178 | } |
179 | |
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 | "launchpad.net/juju-core/errors" |
185 | "launchpad.net/juju-core/provider/dummy" |
186 | coretesting "launchpad.net/juju-core/testing" |
187 | + "launchpad.net/juju-core/testing/testbase" |
188 | coretools "launchpad.net/juju-core/tools" |
189 | "launchpad.net/juju-core/version" |
190 | ) |
191 | |
192 | type BootstrapSuite struct { |
193 | - coretesting.LoggingSuite |
194 | + testbase.LoggingSuite |
195 | coretesting.MgoSuite |
196 | envtesting.ToolsFixture |
197 | } |
198 | |
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 | |
204 | "launchpad.net/juju-core/testing" |
205 | jc "launchpad.net/juju-core/testing/checkers" |
206 | + "launchpad.net/juju-core/testing/testbase" |
207 | ) |
208 | |
209 | type PluginSuite struct { |
210 | - testing.LoggingSuite |
211 | + testbase.LoggingSuite |
212 | oldPath string |
213 | home *testing.FakeHome |
214 | } |
215 | |
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 | "launchpad.net/juju-core/charm" |
221 | "launchpad.net/juju-core/cmd" |
222 | "launchpad.net/juju-core/testing" |
223 | + "launchpad.net/juju-core/testing/testbase" |
224 | ) |
225 | |
226 | // Sadly, this is a very slow test suite, heavily dominated by calls to bzr. |
227 | |
228 | type PublishSuite struct { |
229 | - testing.LoggingSuite |
230 | + testbase.LoggingSuite |
231 | testing.HTTPSuite |
232 | |
233 | home *testing.FakeHome |
234 | |
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 | "launchpad.net/juju-core/provider/dummy" |
240 | coretesting "launchpad.net/juju-core/testing" |
241 | jc "launchpad.net/juju-core/testing/checkers" |
242 | + "launchpad.net/juju-core/testing/testbase" |
243 | ) |
244 | |
245 | type syncToolsSuite struct { |
246 | - coretesting.LoggingSuite |
247 | + testbase.LoggingSuite |
248 | home *coretesting.FakeHome |
249 | targetEnv environs.Environ |
250 | localStorage string |
251 | |
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 | "launchpad.net/juju-core/state/api/params" |
257 | coretesting "launchpad.net/juju-core/testing" |
258 | jc "launchpad.net/juju-core/testing/checkers" |
259 | + "launchpad.net/juju-core/testing/testbase" |
260 | coretools "launchpad.net/juju-core/tools" |
261 | "launchpad.net/juju-core/version" |
262 | "launchpad.net/juju-core/worker" |
263 | @@ -32,7 +33,7 @@ |
264 | var _ = gc.Suite(&toolSuite{}) |
265 | |
266 | type toolSuite struct { |
267 | - coretesting.LoggingSuite |
268 | + testbase.LoggingSuite |
269 | } |
270 | |
271 | var errorImportanceTests = []error{ |
272 | |
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 | "launchpad.net/juju-core/provider/dummy" |
278 | "launchpad.net/juju-core/state" |
279 | "launchpad.net/juju-core/testing" |
280 | + "launchpad.net/juju-core/testing/testbase" |
281 | "launchpad.net/juju-core/utils" |
282 | ) |
283 | |
284 | // We don't want to use JujuConnSuite because it gives us |
285 | // an already-bootstrapped environment. |
286 | type BootstrapSuite struct { |
287 | - testing.LoggingSuite |
288 | + testbase.LoggingSuite |
289 | testing.MgoSuite |
290 | dataDir string |
291 | providerStateURLFile string |
292 | |
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 | "launchpad.net/juju-core/state/watcher" |
298 | "launchpad.net/juju-core/testing" |
299 | jc "launchpad.net/juju-core/testing/checkers" |
300 | + "launchpad.net/juju-core/testing/testbase" |
301 | "launchpad.net/juju-core/tools" |
302 | "launchpad.net/juju-core/version" |
303 | "launchpad.net/juju-core/worker/deployer" |
304 | @@ -40,7 +41,7 @@ |
305 | func (s *MachineSuite) SetUpSuite(c *gc.C) { |
306 | s.agentSuite.SetUpSuite(c) |
307 | s.TestSuite.SetUpSuite(c) |
308 | - restore := testing.PatchValue(&charm.CacheDir, c.MkDir()) |
309 | + restore := testbase.PatchValue(&charm.CacheDir, c.MkDir()) |
310 | s.AddSuiteCleanup(func(*gc.C) { restore() }) |
311 | } |
312 | |
313 | |
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 | "launchpad.net/juju-core/cmd" |
319 | "launchpad.net/juju-core/juju/osenv" |
320 | "launchpad.net/juju-core/testing" |
321 | + "launchpad.net/juju-core/testing/testbase" |
322 | ) |
323 | |
324 | var logger = loggo.GetLogger("juju.test") |
325 | |
326 | type LogSuite struct { |
327 | - testing.CleanupSuite |
328 | + testbase.CleanupSuite |
329 | } |
330 | |
331 | var _ = gc.Suite(&LogSuite{}) |
332 | @@ -59,7 +60,7 @@ |
333 | |
334 | func (s *LogSuite) TestLogConfigFromEnvironment(c *gc.C) { |
335 | config := "juju.cmd=INFO;juju.worker.deployer=DEBUG" |
336 | - testing.PatchEnvironment(osenv.JujuLoggingConfig, config) |
337 | + testbase.PatchEnvironment(osenv.JujuLoggingConfig, config) |
338 | log := newLogWithFlags(c, []string{}) |
339 | c.Assert(log.Path, gc.Equals, "") |
340 | c.Assert(log.Verbose, gc.Equals, false) |
341 | |
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 | jujutesting "launchpad.net/juju-core/juju/testing" |
347 | "launchpad.net/juju-core/testing" |
348 | jc "launchpad.net/juju-core/testing/checkers" |
349 | + "launchpad.net/juju-core/testing/testbase" |
350 | "launchpad.net/juju-core/tools" |
351 | "launchpad.net/juju-core/version" |
352 | ) |
353 | @@ -30,7 +31,7 @@ |
354 | } |
355 | |
356 | type LxcSuite struct { |
357 | - testing.LoggingSuite |
358 | + testbase.LoggingSuite |
359 | lxc.TestSuite |
360 | oldPath string |
361 | } |
362 | @@ -217,7 +218,7 @@ |
363 | } |
364 | |
365 | type NetworkSuite struct { |
366 | - testing.LoggingSuite |
367 | + testbase.LoggingSuite |
368 | } |
369 | |
370 | var _ = gc.Suite(&NetworkSuite{}) |
371 | |
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 | |
377 | "launchpad.net/juju-core/downloader" |
378 | "launchpad.net/juju-core/testing" |
379 | + "launchpad.net/juju-core/testing/testbase" |
380 | ) |
381 | |
382 | type suite struct { |
383 | - testing.LoggingSuite |
384 | + testbase.LoggingSuite |
385 | testing.HTTPSuite |
386 | } |
387 | |
388 | |
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 | envtesting "launchpad.net/juju-core/environs/testing" |
394 | "launchpad.net/juju-core/provider/dummy" |
395 | coretesting "launchpad.net/juju-core/testing" |
396 | + "launchpad.net/juju-core/testing/testbase" |
397 | "launchpad.net/juju-core/tools" |
398 | "launchpad.net/juju-core/version" |
399 | ) |
400 | @@ -32,7 +33,7 @@ |
401 | |
402 | type bootstrapSuite struct { |
403 | home *coretesting.FakeHome |
404 | - coretesting.LoggingSuite |
405 | + testbase.LoggingSuite |
406 | envtesting.ToolsFixture |
407 | } |
408 | |
409 | |
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 | |
415 | "launchpad.net/juju-core/cert" |
416 | "launchpad.net/juju-core/testing" |
417 | + "launchpad.net/juju-core/testing/testbase" |
418 | ) |
419 | |
420 | // EnvironsCertSuite tests the internal functions defined in environs/cert.go |
421 | type EnvironsCertSuite struct { |
422 | - testing.LoggingSuite |
423 | + testbase.LoggingSuite |
424 | } |
425 | |
426 | var _ = gc.Suite(&EnvironsCertSuite{}) |
427 | |
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 | "launchpad.net/juju-core/environs" |
433 | "launchpad.net/juju-core/environs/config" |
434 | "launchpad.net/juju-core/testing" |
435 | + "launchpad.net/juju-core/testing/testbase" |
436 | ) |
437 | |
438 | type EnvironsCertSuite struct { |
439 | - testing.LoggingSuite |
440 | + testbase.LoggingSuite |
441 | } |
442 | |
443 | var _ = gc.Suite(&EnvironsCertSuite{}) |
444 | |
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 | "launchpad.net/juju-core/state" |
450 | "launchpad.net/juju-core/state/api" |
451 | "launchpad.net/juju-core/testing" |
452 | + "launchpad.net/juju-core/testing/testbase" |
453 | "launchpad.net/juju-core/tools" |
454 | "launchpad.net/juju-core/version" |
455 | ) |
456 | @@ -27,7 +28,7 @@ |
457 | // Use local suite since this file lives in the ec2 package |
458 | // for testing internals. |
459 | type cloudinitSuite struct { |
460 | - testing.LoggingSuite |
461 | + testbase.LoggingSuite |
462 | } |
463 | |
464 | var _ = gc.Suite(&cloudinitSuite{}) |
465 | |
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 | "launchpad.net/juju-core/state" |
471 | "launchpad.net/juju-core/state/api" |
472 | "launchpad.net/juju-core/testing" |
473 | + "launchpad.net/juju-core/testing/testbase" |
474 | "launchpad.net/juju-core/tools" |
475 | "launchpad.net/juju-core/utils" |
476 | "launchpad.net/juju-core/version" |
477 | @@ -34,7 +35,7 @@ |
478 | } |
479 | |
480 | type CloudInitSuite struct { |
481 | - testing.LoggingSuite |
482 | + testbase.LoggingSuite |
483 | } |
484 | |
485 | var _ = gc.Suite(&CloudInitSuite{}) |
486 | |
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 | "launchpad.net/juju-core/schema" |
492 | "launchpad.net/juju-core/testing" |
493 | jc "launchpad.net/juju-core/testing/checkers" |
494 | + "launchpad.net/juju-core/testing/testbase" |
495 | "launchpad.net/juju-core/version" |
496 | ) |
497 | |
498 | @@ -25,7 +26,7 @@ |
499 | } |
500 | |
501 | type ConfigSuite struct { |
502 | - testing.LoggingSuite |
503 | + testbase.LoggingSuite |
504 | home string |
505 | } |
506 | |
507 | |
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 | |
513 | "launchpad.net/juju-core/environs/filestorage" |
514 | "launchpad.net/juju-core/environs/httpstorage" |
515 | - "launchpad.net/juju-core/testing" |
516 | + "launchpad.net/juju-core/testing/testbase" |
517 | ) |
518 | |
519 | func TestLocal(t *stdtesting.T) { |
520 | @@ -26,7 +26,7 @@ |
521 | } |
522 | |
523 | type backendSuite struct { |
524 | - testing.LoggingSuite |
525 | + testbase.LoggingSuite |
526 | } |
527 | |
528 | var _ = gc.Suite(&backendSuite{}) |
529 | |
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 | "launchpad.net/juju-core/environs/imagemetadata" |
535 | "launchpad.net/juju-core/environs/simplestreams" |
536 | coretesting "launchpad.net/juju-core/testing" |
537 | + "launchpad.net/juju-core/testing/testbase" |
538 | ) |
539 | |
540 | type ValidateSuite struct { |
541 | - coretesting.LoggingSuite |
542 | + testbase.LoggingSuite |
543 | home *coretesting.FakeHome |
544 | } |
545 | |
546 | |
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 | "launchpad.net/juju-core/constraints" |
552 | "launchpad.net/juju-core/environs/imagemetadata" |
553 | "launchpad.net/juju-core/environs/simplestreams" |
554 | - coretesting "launchpad.net/juju-core/testing" |
555 | + "launchpad.net/juju-core/testing/testbase" |
556 | ) |
557 | |
558 | type imageSuite struct { |
559 | - coretesting.LoggingSuite |
560 | + testbase.LoggingSuite |
561 | } |
562 | |
563 | func Test(t *testing.T) { |
564 | @@ -24,14 +24,6 @@ |
565 | |
566 | var _ = gc.Suite(&imageSuite{}) |
567 | |
568 | -func (s *imageSuite) SetUpSuite(c *gc.C) { |
569 | - s.LoggingSuite.SetUpSuite(c) |
570 | -} |
571 | - |
572 | -func (s *imageSuite) TearDownSuite(c *gc.C) { |
573 | - s.LoggingSuite.TearDownTest(c) |
574 | -} |
575 | - |
576 | var jsonImagesContent = ` |
577 | { |
578 | "content_id": "com.ubuntu.cloud:released:aws", |
579 | |
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 | gc "launchpad.net/gocheck" |
585 | |
586 | "launchpad.net/juju-core/constraints" |
587 | - "launchpad.net/juju-core/testing" |
588 | + "launchpad.net/juju-core/testing/testbase" |
589 | ) |
590 | |
591 | type instanceTypeSuite struct { |
592 | - testing.LoggingSuite |
593 | + testbase.LoggingSuite |
594 | } |
595 | |
596 | var _ = gc.Suite(&instanceTypeSuite{}) |
597 | |
598 | -func (s *instanceTypeSuite) SetUpSuite(c *gc.C) { |
599 | - s.LoggingSuite.SetUpSuite(c) |
600 | -} |
601 | - |
602 | -func (s *instanceTypeSuite) TearDownSuite(c *gc.C) { |
603 | - s.LoggingSuite.TearDownTest(c) |
604 | -} |
605 | - |
606 | var hvm = "hvm" |
607 | |
608 | // The instance types below do not necessarily reflect reality and are just |
609 | |
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 | statetesting "launchpad.net/juju-core/state/testing" |
615 | coretesting "launchpad.net/juju-core/testing" |
616 | jc "launchpad.net/juju-core/testing/checkers" |
617 | + "launchpad.net/juju-core/testing/testbase" |
618 | coretools "launchpad.net/juju-core/tools" |
619 | "launchpad.net/juju-core/utils" |
620 | "launchpad.net/juju-core/version" |
621 | @@ -42,7 +43,7 @@ |
622 | // (e.g. Amazon EC2). The Environ is opened once only for all the tests |
623 | // in the suite, stored in Env, and Destroyed after the suite has completed. |
624 | type LiveTests struct { |
625 | - coretesting.LoggingSuite |
626 | + testbase.LoggingSuite |
627 | envtesting.ToolsFixture |
628 | |
629 | // TestConfig contains the configuration attributes for opening an environment. |
630 | |
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 | "launchpad.net/juju-core/juju/testing" |
636 | coretesting "launchpad.net/juju-core/testing" |
637 | jc "launchpad.net/juju-core/testing/checkers" |
638 | + "launchpad.net/juju-core/testing/testbase" |
639 | "launchpad.net/juju-core/utils" |
640 | "launchpad.net/juju-core/version" |
641 | ) |
642 | @@ -32,7 +33,7 @@ |
643 | // is opened once for each test, and some potentially expensive operations |
644 | // may be executed. |
645 | type Tests struct { |
646 | - coretesting.LoggingSuite |
647 | + testbase.LoggingSuite |
648 | TestConfig coretesting.Attrs |
649 | envtesting.ToolsFixture |
650 | Env environs.Environ |
651 | |
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 | |
657 | gc "launchpad.net/gocheck" |
658 | |
659 | - "launchpad.net/juju-core/testing" |
660 | jc "launchpad.net/juju-core/testing/checkers" |
661 | + "launchpad.net/juju-core/testing/testbase" |
662 | ) |
663 | |
664 | type detectionSuite struct { |
665 | - testing.LoggingSuite |
666 | + testbase.LoggingSuite |
667 | } |
668 | |
669 | var _ = gc.Suite(&detectionSuite{}) |
670 | @@ -71,7 +71,7 @@ |
671 | c.Assert(err, gc.IsNil) |
672 | err = ioutil.WriteFile(sshexpectedinput, []byte(input), 0644) |
673 | c.Assert(err, gc.IsNil) |
674 | - return testing.PatchEnvironment("PATH", fakebin+":"+os.Getenv("PATH")) |
675 | + return testbase.PatchEnvironment("PATH", fakebin+":"+os.Getenv("PATH")) |
676 | } |
677 | |
678 | func (s *detectionSuite) TestDetectSeries(c *gc.C) { |
679 | |
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 | "launchpad.net/juju-core/environs" |
685 | "launchpad.net/juju-core/provider/dummy" |
686 | "launchpad.net/juju-core/testing" |
687 | + "launchpad.net/juju-core/testing/testbase" |
688 | "launchpad.net/juju-core/version" |
689 | ) |
690 | |
691 | type MongoToolsSuite struct { |
692 | env environs.Environ |
693 | - testing.LoggingSuite |
694 | + testbase.LoggingSuite |
695 | dataDir string |
696 | } |
697 | |
698 | |
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 | |
704 | "launchpad.net/juju-core/environs/jujutest" |
705 | "launchpad.net/juju-core/environs/simplestreams" |
706 | - "launchpad.net/juju-core/testing" |
707 | + "launchpad.net/juju-core/testing/testbase" |
708 | ) |
709 | |
710 | var imageData = map[string]string{ |
711 | @@ -392,7 +392,7 @@ |
712 | } |
713 | |
714 | type LocalLiveSimplestreamsSuite struct { |
715 | - testing.LoggingSuite |
716 | + testbase.LoggingSuite |
717 | Source simplestreams.DataSource |
718 | RequireSigned bool |
719 | DataType string |
720 | |
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 | |
726 | "launchpad.net/juju-core/environs/storage" |
727 | coreerrors "launchpad.net/juju-core/errors" |
728 | - "launchpad.net/juju-core/testing" |
729 | jc "launchpad.net/juju-core/testing/checkers" |
730 | + "launchpad.net/juju-core/testing/testbase" |
731 | "launchpad.net/juju-core/utils" |
732 | ) |
733 | |
734 | type storageSuite struct { |
735 | - testing.LoggingSuite |
736 | + testbase.LoggingSuite |
737 | restoreEnv func() |
738 | } |
739 | |
740 | @@ -42,8 +42,8 @@ |
741 | cmd := exec.Command("bash", "-c", command) |
742 | uid := fmt.Sprint(os.Getuid()) |
743 | gid := fmt.Sprint(os.Getgid()) |
744 | - defer testing.PatchEnvironment("SUDO_UID", uid)() |
745 | - defer testing.PatchEnvironment("SUDO_GID", gid)() |
746 | + defer testbase.PatchEnvironment("SUDO_UID", uid)() |
747 | + defer testbase.PatchEnvironment("SUDO_GID", gid)() |
748 | cmd.Env = os.Environ() |
749 | return cmd |
750 | } |
751 | @@ -59,7 +59,7 @@ |
752 | c.Assert(err, gc.IsNil) |
753 | |
754 | bin := c.MkDir() |
755 | - s.restoreEnv = testing.PatchEnvironment("PATH", bin+":"+os.Getenv("PATH")) |
756 | + s.restoreEnv = testbase.PatchEnvironment("PATH", bin+":"+os.Getenv("PATH")) |
757 | |
758 | // Create a "sudo" command which just executes its args. |
759 | c.Assert(os.Symlink("/usr/bin/env", filepath.Join(bin, "sudo")), gc.IsNil) |
760 | |
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 | envtools "launchpad.net/juju-core/environs/tools" |
766 | "launchpad.net/juju-core/provider/dummy" |
767 | coretesting "launchpad.net/juju-core/testing" |
768 | + "launchpad.net/juju-core/testing/testbase" |
769 | coretools "launchpad.net/juju-core/tools" |
770 | "launchpad.net/juju-core/version" |
771 | ) |
772 | @@ -34,7 +35,7 @@ |
773 | } |
774 | |
775 | type syncSuite struct { |
776 | - coretesting.LoggingSuite |
777 | + testbase.LoggingSuite |
778 | envtesting.ToolsFixture |
779 | home *coretesting.FakeHome |
780 | targetEnv environs.Environ |
781 | @@ -241,7 +242,7 @@ |
782 | |
783 | type uploadSuite struct { |
784 | env environs.Environ |
785 | - coretesting.LoggingSuite |
786 | + testbase.LoggingSuite |
787 | envtesting.ToolsFixture |
788 | } |
789 | |
790 | |
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 | gc "launchpad.net/gocheck" |
796 | |
797 | "launchpad.net/juju-core/environs/tools" |
798 | - "launchpad.net/juju-core/testing" |
799 | + "launchpad.net/juju-core/testing/testbase" |
800 | ) |
801 | |
802 | type buildSuite struct { |
803 | - testing.LoggingSuite |
804 | + testbase.LoggingSuite |
805 | restore func() |
806 | cwd string |
807 | filePath string |
808 | |
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 | envtesting "launchpad.net/juju-core/environs/testing" |
814 | envtools "launchpad.net/juju-core/environs/tools" |
815 | "launchpad.net/juju-core/provider/dummy" |
816 | - "launchpad.net/juju-core/testing" |
817 | + "launchpad.net/juju-core/testing/testbase" |
818 | coretools "launchpad.net/juju-core/tools" |
819 | "launchpad.net/juju-core/version" |
820 | ) |
821 | |
822 | type StorageSuite struct { |
823 | env environs.Environ |
824 | - testing.LoggingSuite |
825 | + testbase.LoggingSuite |
826 | dataDir string |
827 | } |
828 | |
829 | |
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 | envtools "launchpad.net/juju-core/environs/tools" |
835 | "launchpad.net/juju-core/errors" |
836 | "launchpad.net/juju-core/provider/dummy" |
837 | - "launchpad.net/juju-core/testing" |
838 | jc "launchpad.net/juju-core/testing/checkers" |
839 | + "launchpad.net/juju-core/testing/testbase" |
840 | coretools "launchpad.net/juju-core/tools" |
841 | "launchpad.net/juju-core/version" |
842 | ) |
843 | @@ -40,7 +40,7 @@ |
844 | type ToolsSuite struct { |
845 | toolsTestHelper |
846 | env environs.Environ |
847 | - testing.LoggingSuite |
848 | + testbase.LoggingSuite |
849 | envtesting.ToolsFixture |
850 | origCurrentVersion version.Binary |
851 | } |
852 | |
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 | "launchpad.net/juju-core/environs/config" |
858 | "launchpad.net/juju-core/environs/simplestreams" |
859 | coretesting "launchpad.net/juju-core/testing" |
860 | + "launchpad.net/juju-core/testing/testbase" |
861 | ) |
862 | |
863 | type ValidateSuite struct { |
864 | - coretesting.LoggingSuite |
865 | + testbase.LoggingSuite |
866 | home *coretesting.FakeHome |
867 | } |
868 | |
869 | |
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 | |
875 | gc "launchpad.net/gocheck" |
876 | |
877 | - "launchpad.net/juju-core/testing" |
878 | + "launchpad.net/juju-core/testing/testbase" |
879 | ) |
880 | |
881 | type AddressSuite struct { |
882 | - testing.LoggingSuite |
883 | + testbase.LoggingSuite |
884 | } |
885 | |
886 | var _ = gc.Suite(&AddressSuite{}) |
887 | |
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 | "launchpad.net/juju-core/state/api" |
893 | coretesting "launchpad.net/juju-core/testing" |
894 | jc "launchpad.net/juju-core/testing/checkers" |
895 | + "launchpad.net/juju-core/testing/testbase" |
896 | ) |
897 | |
898 | type NewAPIConnSuite struct { |
899 | - coretesting.LoggingSuite |
900 | + testbase.LoggingSuite |
901 | envtesting.ToolsFixture |
902 | } |
903 | |
904 | @@ -58,7 +59,7 @@ |
905 | } |
906 | |
907 | type NewAPIClientSuite struct { |
908 | - coretesting.LoggingSuite |
909 | + testbase.LoggingSuite |
910 | } |
911 | |
912 | var _ = gc.Suite(&NewAPIClientSuite{}) |
913 | @@ -75,7 +76,7 @@ |
914 | // Make sure of that by providing a suitably long delay |
915 | // and checking that the connection happens within that |
916 | // time. |
917 | - defer coretesting.PatchValue(juju.ProviderConnectDelay, coretesting.LongWait).Restore() |
918 | + defer testbase.PatchValue(juju.ProviderConnectDelay, coretesting.LongWait).Restore() |
919 | bootstrapEnv(c, coretesting.SampleEnvName) |
920 | |
921 | startTime := time.Now() |
922 | @@ -125,7 +126,7 @@ |
923 | called++ |
924 | return expectState, nil |
925 | } |
926 | - defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() |
927 | + defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
928 | st, err := juju.NewAPIFromName("noconfig", store) |
929 | c.Assert(err, gc.IsNil) |
930 | c.Assert(st, gc.Equals, expectState) |
931 | @@ -138,7 +139,7 @@ |
932 | store := newConfigStore("noconfig", &environInfo{ |
933 | err: expectErr, |
934 | }) |
935 | - defer coretesting.PatchValue(juju.APIOpen, panicAPIOpen).Restore() |
936 | + defer testbase.PatchValue(juju.APIOpen, panicAPIOpen).Restore() |
937 | client, err := juju.NewAPIFromName("noconfig", store) |
938 | c.Assert(err, gc.Equals, expectErr) |
939 | c.Assert(client, gc.IsNil) |
940 | @@ -157,7 +158,7 @@ |
941 | store := newConfigStore("noconfig", &environInfo{ |
942 | endpoint: endpoint, |
943 | }) |
944 | - defer coretesting.PatchValue(juju.APIOpen, panicAPIOpen).Restore() |
945 | + defer testbase.PatchValue(juju.APIOpen, panicAPIOpen).Restore() |
946 | |
947 | st, err := juju.NewAPIFromName("noconfig", store) |
948 | c.Assert(err, gc.ErrorMatches, `environment "noconfig" not found`) |
949 | @@ -177,7 +178,7 @@ |
950 | apiOpen := func(apiInfo *api.Info, opts api.DialOpts) (*api.State, error) { |
951 | return nil, expectErr |
952 | } |
953 | - defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() |
954 | + defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
955 | st, err := juju.NewAPIFromName("noconfig", store) |
956 | c.Assert(err, gc.Equals, expectErr) |
957 | c.Assert(st, gc.IsNil) |
958 | @@ -199,7 +200,7 @@ |
959 | // On a sample run with no delay, the logic took 45ms to run, so |
960 | // we make the delay slightly more than that, so that if the |
961 | // logic doesn't delay at all, the test will fail reasonably consistently. |
962 | - defer coretesting.PatchValue(juju.ProviderConnectDelay, 50*time.Millisecond).Restore() |
963 | + defer testbase.PatchValue(juju.ProviderConnectDelay, 50*time.Millisecond).Restore() |
964 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { |
965 | if info.Addrs[0] == "infoapi.com" { |
966 | infoEndpointOpened <- struct{}{} |
967 | @@ -207,7 +208,7 @@ |
968 | } |
969 | return cfgOpenedState, nil |
970 | } |
971 | - defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() |
972 | + defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
973 | |
974 | stateClosed, restoreAPIClose := setAPIClosed() |
975 | defer restoreAPIClose.Restore() |
976 | @@ -250,7 +251,7 @@ |
977 | cfgOpenedState := new(api.State) |
978 | cfgEndpointOpened := make(chan struct{}) |
979 | |
980 | - defer coretesting.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() |
981 | + defer testbase.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() |
982 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { |
983 | if info.Addrs[0] == "infoapi.com" { |
984 | infoEndpointOpened <- struct{}{} |
985 | @@ -261,7 +262,7 @@ |
986 | <-cfgEndpointOpened |
987 | return cfgOpenedState, nil |
988 | } |
989 | - defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() |
990 | + defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
991 | |
992 | stateClosed, restoreAPIClose := setAPIClosed() |
993 | defer restoreAPIClose.Restore() |
994 | @@ -315,14 +316,14 @@ |
995 | endpoint: endpoint, |
996 | }) |
997 | |
998 | - defer coretesting.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() |
999 | + defer testbase.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore() |
1000 | apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) { |
1001 | if info.Addrs[0] == "infoapi.com" { |
1002 | return nil, fmt.Errorf("info connect failed") |
1003 | } |
1004 | return nil, fmt.Errorf("config connect failed") |
1005 | } |
1006 | - defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore() |
1007 | + defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore() |
1008 | st, err := juju.NewAPIFromName(coretesting.SampleEnvName, store) |
1009 | c.Check(err, gc.ErrorMatches, "config connect failed") |
1010 | c.Check(st, gc.IsNil) |
1011 | @@ -344,13 +345,13 @@ |
1012 | c.Assert(envInfo.Name, gc.Equals, expectName) |
1013 | } |
1014 | |
1015 | -func setAPIClosed() (<-chan *api.State, coretesting.Restorer) { |
1016 | +func setAPIClosed() (<-chan *api.State, testbase.Restorer) { |
1017 | stateClosed := make(chan *api.State) |
1018 | apiClose := func(st *api.State) error { |
1019 | stateClosed <- st |
1020 | return nil |
1021 | } |
1022 | - return stateClosed, coretesting.PatchValue(juju.APIClose, apiClose) |
1023 | + return stateClosed, testbase.PatchValue(juju.APIClose, apiClose) |
1024 | } |
1025 | |
1026 | func newConfigStore(envName string, info *environInfo) environs.ConfigStorage { |
1027 | |
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 | "launchpad.net/juju-core/state" |
1033 | coretesting "launchpad.net/juju-core/testing" |
1034 | jc "launchpad.net/juju-core/testing/checkers" |
1035 | + "launchpad.net/juju-core/testing/testbase" |
1036 | "launchpad.net/juju-core/utils" |
1037 | "launchpad.net/juju-core/utils/set" |
1038 | ) |
1039 | @@ -36,7 +37,7 @@ |
1040 | } |
1041 | |
1042 | type NewConnSuite struct { |
1043 | - coretesting.LoggingSuite |
1044 | + testbase.LoggingSuite |
1045 | envtesting.ToolsFixture |
1046 | } |
1047 | |
1048 | @@ -222,7 +223,7 @@ |
1049 | } |
1050 | |
1051 | type ConnSuite struct { |
1052 | - coretesting.LoggingSuite |
1053 | + testbase.LoggingSuite |
1054 | coretesting.MgoSuite |
1055 | envtesting.ToolsFixture |
1056 | conn *juju.Conn |
1057 | |
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 | |
1063 | gc "launchpad.net/gocheck" |
1064 | |
1065 | - coretesting "launchpad.net/juju-core/testing" |
1066 | + "launchpad.net/juju-core/testing/testbase" |
1067 | ) |
1068 | |
1069 | func Test(t *testing.T) { |
1070 | @@ -21,6 +21,6 @@ |
1071 | |
1072 | func (*importSuite) TestDependencies(c *gc.C) { |
1073 | // This test is to ensure we don't bring in dependencies at all. |
1074 | - c.Assert(coretesting.FindJujuCoreImports(c, "launchpad.net/juju-core/juju/osenv"), |
1075 | + c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/juju/osenv"), |
1076 | gc.HasLen, 0) |
1077 | } |
1078 | |
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 | gc "launchpad.net/gocheck" |
1084 | |
1085 | "launchpad.net/juju-core/juju/osenv" |
1086 | - "launchpad.net/juju-core/testing" |
1087 | + "launchpad.net/juju-core/testing/testbase" |
1088 | ) |
1089 | |
1090 | func (*importSuite) TestHomeLinux(c *gc.C) { |
1091 | h := "/home/foo/bar" |
1092 | - testing.PatchEnvironment("HOME", h) |
1093 | + testbase.PatchEnvironment("HOME", h) |
1094 | c.Check(osenv.Home(), gc.Equals, h) |
1095 | } |
1096 | |
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 | ) |
1102 | |
1103 | func (*importSuite) TestHome(c *gc.C) { |
1104 | - testing.PatchEnvironment("HOMEPATH", "") |
1105 | - testing.PatchEnvironment("HOMEDRIVE", "") |
1106 | + testbase.PatchEnvironment("HOMEPATH", "") |
1107 | + testbase.PatchEnvironment("HOMEDRIVE", "") |
1108 | |
1109 | drive := "P:" |
1110 | path := `\home\foo\bar` |
1111 | |
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 | "launchpad.net/juju-core/state" |
1117 | "launchpad.net/juju-core/state/api" |
1118 | "launchpad.net/juju-core/testing" |
1119 | + "launchpad.net/juju-core/testing/testbase" |
1120 | "launchpad.net/juju-core/version" |
1121 | ) |
1122 | |
1123 | // JujuConnSuite provides a freshly bootstrapped juju.Conn |
1124 | -// for each test. It also includes testing.LoggingSuite. |
1125 | +// for each test. It also includes testbase.LoggingSuite. |
1126 | // |
1127 | // It also sets up RootDir to point to a directory hierarchy |
1128 | // mirroring the intended juju directory structure, including |
1129 | @@ -50,7 +51,7 @@ |
1130 | // /var/lib/juju: the use cases are completely non-overlapping, and any tests that |
1131 | // really do need both to exist ought to be embedding distinct fixtures for the |
1132 | // distinct environments. |
1133 | - testing.LoggingSuite |
1134 | + testbase.LoggingSuite |
1135 | testing.MgoSuite |
1136 | envtesting.ToolsFixture |
1137 | Conn *juju.Conn |
1138 | |
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 | gc "launchpad.net/gocheck" |
1144 | |
1145 | envtesting "launchpad.net/juju-core/environs/testing" |
1146 | - "launchpad.net/juju-core/testing" |
1147 | + "launchpad.net/juju-core/testing/testbase" |
1148 | ) |
1149 | |
1150 | func TestAzureProvider(t *stdtesting.T) { |
1151 | @@ -17,7 +17,7 @@ |
1152 | } |
1153 | |
1154 | type providerSuite struct { |
1155 | - testing.LoggingSuite |
1156 | + testbase.LoggingSuite |
1157 | envtesting.ToolsFixture |
1158 | restoreTimeouts func() |
1159 | } |
1160 | |
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 | |
1166 | "launchpad.net/juju-core/environs/config" |
1167 | "launchpad.net/juju-core/testing" |
1168 | + "launchpad.net/juju-core/testing/testbase" |
1169 | ) |
1170 | |
1171 | type configSuite struct { |
1172 | - testing.LoggingSuite |
1173 | + testbase.LoggingSuite |
1174 | } |
1175 | |
1176 | var _ = gc.Suite(&configSuite{}) |
1177 | |
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 | "launchpad.net/juju-core/state" |
1183 | "launchpad.net/juju-core/state/api" |
1184 | "launchpad.net/juju-core/testing" |
1185 | + "launchpad.net/juju-core/testing/testbase" |
1186 | "launchpad.net/juju-core/tools" |
1187 | ) |
1188 | |
1189 | type customDataSuite struct { |
1190 | - testing.LoggingSuite |
1191 | + testbase.LoggingSuite |
1192 | } |
1193 | |
1194 | var _ = gc.Suite(&customDataSuite{}) |
1195 | |
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 | "launchpad.net/juju-core/environs/config" |
1201 | "launchpad.net/juju-core/juju/osenv" |
1202 | "launchpad.net/juju-core/testing" |
1203 | + "launchpad.net/juju-core/testing/testbase" |
1204 | ) |
1205 | |
1206 | // Use local suite since this file lives in the ec2 package |
1207 | // for testing internals. |
1208 | type ConfigSuite struct { |
1209 | - testing.LoggingSuite |
1210 | + testbase.LoggingSuite |
1211 | savedHome, savedAccessKey, savedSecretKey string |
1212 | } |
1213 | |
1214 | |
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 | "launchpad.net/juju-core/environs/imagemetadata" |
1220 | "launchpad.net/juju-core/environs/instances" |
1221 | "launchpad.net/juju-core/environs/simplestreams" |
1222 | - "launchpad.net/juju-core/testing" |
1223 | + "launchpad.net/juju-core/testing/testbase" |
1224 | ) |
1225 | |
1226 | type imageSuite struct { |
1227 | - testing.LoggingSuite |
1228 | + testbase.LoggingSuite |
1229 | } |
1230 | |
1231 | var _ = gc.Suite(&imageSuite{}) |
1232 | @@ -30,7 +30,7 @@ |
1233 | } |
1234 | |
1235 | type specSuite struct { |
1236 | - testing.LoggingSuite |
1237 | + testbase.LoggingSuite |
1238 | } |
1239 | |
1240 | var _ = gc.Suite(&specSuite{}) |
1241 | |
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 | "launchpad.net/juju-core/provider/ec2" |
1247 | coretesting "launchpad.net/juju-core/testing" |
1248 | jc "launchpad.net/juju-core/testing/checkers" |
1249 | + "launchpad.net/juju-core/testing/testbase" |
1250 | "launchpad.net/juju-core/version" |
1251 | ) |
1252 | |
1253 | @@ -72,7 +73,7 @@ |
1254 | // LiveTests contains tests that can be run against the Amazon servers. |
1255 | // Each test runs using the same ec2 connection. |
1256 | type LiveTests struct { |
1257 | - coretesting.LoggingSuite |
1258 | + testbase.LoggingSuite |
1259 | jujutest.LiveTests |
1260 | writablePublicStorage storage.Storage |
1261 | } |
1262 | |
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 | "launchpad.net/juju-core/provider/ec2" |
1268 | "launchpad.net/juju-core/testing" |
1269 | jc "launchpad.net/juju-core/testing/checkers" |
1270 | + "launchpad.net/juju-core/testing/testbase" |
1271 | "launchpad.net/juju-core/utils" |
1272 | ) |
1273 | |
1274 | @@ -372,7 +373,7 @@ |
1275 | // localNonUSEastSuite is similar to localServerSuite but the S3 mock server |
1276 | // behaves as if it is not in the us-east region. |
1277 | type localNonUSEastSuite struct { |
1278 | - testing.LoggingSuite |
1279 | + testbase.LoggingSuite |
1280 | restoreEC2Patching func() |
1281 | srv localServer |
1282 | env environs.Environ |
1283 | |
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 | "launchpad.net/juju-core/container/lxc" |
1289 | "launchpad.net/juju-core/provider/local" |
1290 | "launchpad.net/juju-core/testing" |
1291 | + "launchpad.net/juju-core/testing/testbase" |
1292 | ) |
1293 | |
1294 | type baseProviderSuite struct { |
1295 | - testing.LoggingSuite |
1296 | + testbase.LoggingSuite |
1297 | lxc.TestSuite |
1298 | home *testing.FakeHome |
1299 | restore func() |
1300 | |
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 | "launchpad.net/juju-core/environs" |
1306 | "launchpad.net/juju-core/provider" |
1307 | "launchpad.net/juju-core/provider/local" |
1308 | - "launchpad.net/juju-core/testing" |
1309 | + "launchpad.net/juju-core/testing/testbase" |
1310 | ) |
1311 | |
1312 | func TestLocal(t *stdtesting.T) { |
1313 | @@ -19,7 +19,7 @@ |
1314 | } |
1315 | |
1316 | type localSuite struct { |
1317 | - testing.LoggingSuite |
1318 | + testbase.LoggingSuite |
1319 | } |
1320 | |
1321 | var _ = gc.Suite(&localSuite{}) |
1322 | |
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 | |
1328 | gc "launchpad.net/gocheck" |
1329 | |
1330 | - "launchpad.net/juju-core/testing" |
1331 | + "launchpad.net/juju-core/testing/testbase" |
1332 | ) |
1333 | |
1334 | type prereqsSuite struct { |
1335 | - testing.LoggingSuite |
1336 | + testbase.LoggingSuite |
1337 | tmpdir string |
1338 | oldpath string |
1339 | } |
1340 | |
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 | |
1346 | "launchpad.net/juju-core/environs" |
1347 | "launchpad.net/juju-core/testing" |
1348 | + "launchpad.net/juju-core/testing/testbase" |
1349 | ) |
1350 | |
1351 | type configSuite struct { |
1352 | - testing.LoggingSuite |
1353 | + testbase.LoggingSuite |
1354 | } |
1355 | |
1356 | var _ = gc.Suite(&configSuite{}) |
1357 | |
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 | "launchpad.net/gomaasapi" |
1363 | |
1364 | envtesting "launchpad.net/juju-core/environs/testing" |
1365 | - "launchpad.net/juju-core/testing" |
1366 | + "launchpad.net/juju-core/testing/testbase" |
1367 | ) |
1368 | |
1369 | func TestMAAS(t *stdtesting.T) { |
1370 | @@ -18,7 +18,7 @@ |
1371 | } |
1372 | |
1373 | type providerSuite struct { |
1374 | - testing.LoggingSuite |
1375 | + testbase.LoggingSuite |
1376 | envtesting.ToolsFixture |
1377 | environ *maasEnviron |
1378 | testMAASObject *gomaasapi.TestMAASObject |
1379 | |
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 | "launchpad.net/juju-core/environs" |
1385 | "launchpad.net/juju-core/environs/config" |
1386 | "launchpad.net/juju-core/testing" |
1387 | + "launchpad.net/juju-core/testing/testbase" |
1388 | ) |
1389 | |
1390 | type ConfigSuite struct { |
1391 | - testing.LoggingSuite |
1392 | + testbase.LoggingSuite |
1393 | savedVars map[string]string |
1394 | oldJujuHome *testing.FakeHome |
1395 | } |
1396 | |
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 | envtesting "launchpad.net/juju-core/environs/testing" |
1402 | "launchpad.net/juju-core/provider/openstack" |
1403 | coretesting "launchpad.net/juju-core/testing" |
1404 | + "launchpad.net/juju-core/testing/testbase" |
1405 | ) |
1406 | |
1407 | // generate a different bucket name for each config instance, so that |
1408 | @@ -72,7 +73,7 @@ |
1409 | // The deployment can be a real live instance or service doubles. |
1410 | // Each test runs using the same connection. |
1411 | type LiveTests struct { |
1412 | - coretesting.LoggingSuite |
1413 | + testbase.LoggingSuite |
1414 | jujutest.LiveTests |
1415 | cred *identity.Credentials |
1416 | writeablePublicStorage storage.Storage |
1417 | |
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 | "launchpad.net/juju-core/provider/openstack" |
1423 | coretesting "launchpad.net/juju-core/testing" |
1424 | jc "launchpad.net/juju-core/testing/checkers" |
1425 | + "launchpad.net/juju-core/testing/testbase" |
1426 | "launchpad.net/juju-core/version" |
1427 | ) |
1428 | |
1429 | @@ -149,7 +150,7 @@ |
1430 | |
1431 | // localLiveSuite runs tests from LiveTests using an Openstack service double. |
1432 | type localLiveSuite struct { |
1433 | - coretesting.LoggingSuite |
1434 | + testbase.LoggingSuite |
1435 | LiveTests |
1436 | srv localServer |
1437 | } |
1438 | @@ -184,7 +185,7 @@ |
1439 | // to test on a live Openstack server. The service double is started and stopped for |
1440 | // each test. |
1441 | type localServerSuite struct { |
1442 | - coretesting.LoggingSuite |
1443 | + testbase.LoggingSuite |
1444 | jujutest.Tests |
1445 | cred *identity.Credentials |
1446 | srv localServer |
1447 | |
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 | "launchpad.net/juju-core/provider" |
1453 | "launchpad.net/juju-core/testing" |
1454 | jc "launchpad.net/juju-core/testing/checkers" |
1455 | + "launchpad.net/juju-core/testing/testbase" |
1456 | ) |
1457 | |
1458 | type StateSuite struct { |
1459 | - testing.LoggingSuite |
1460 | + testbase.LoggingSuite |
1461 | } |
1462 | |
1463 | var _ = gc.Suite(&StateSuite{}) |
1464 | |
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 | |
1470 | "launchpad.net/juju-core/rpc" |
1471 | "launchpad.net/juju-core/rpc/jsoncodec" |
1472 | - "launchpad.net/juju-core/testing" |
1473 | + "launchpad.net/juju-core/testing/testbase" |
1474 | ) |
1475 | |
1476 | type suite struct { |
1477 | - testing.LoggingSuite |
1478 | + testbase.LoggingSuite |
1479 | } |
1480 | |
1481 | var _ = gc.Suite(&suite{}) |
1482 | |
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 | "launchpad.net/juju-core/log" |
1488 | "launchpad.net/juju-core/rpc" |
1489 | "launchpad.net/juju-core/rpc/jsoncodec" |
1490 | - "launchpad.net/juju-core/testing" |
1491 | + "launchpad.net/juju-core/testing/testbase" |
1492 | ) |
1493 | |
1494 | type suite struct { |
1495 | - testing.LoggingSuite |
1496 | + testbase.LoggingSuite |
1497 | } |
1498 | |
1499 | var _ = gc.Suite(&suite{}) |
1500 | |
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 | "launchpad.net/juju-core/state" |
1506 | "launchpad.net/juju-core/state/api/params" |
1507 | "launchpad.net/juju-core/state/apiserver/common" |
1508 | - "launchpad.net/juju-core/testing" |
1509 | jc "launchpad.net/juju-core/testing/checkers" |
1510 | + "launchpad.net/juju-core/testing/testbase" |
1511 | ) |
1512 | |
1513 | type errorsSuite struct { |
1514 | - testing.LoggingSuite |
1515 | + testbase.LoggingSuite |
1516 | } |
1517 | |
1518 | var _ = gc.Suite(&errorsSuite{}) |
1519 | |
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 | |
1525 | "launchpad.net/juju-core/state" |
1526 | "launchpad.net/juju-core/testing" |
1527 | + "launchpad.net/juju-core/testing/testbase" |
1528 | ) |
1529 | |
1530 | // TestPackage integrates the tests into gotest. |
1531 | @@ -22,7 +23,7 @@ |
1532 | // test suites (StateSuite, CharmSuite, MachineSuite, etc). |
1533 | type ConnSuite struct { |
1534 | testing.MgoSuite |
1535 | - testing.LoggingSuite |
1536 | + testbase.LoggingSuite |
1537 | annotations *mgo.Collection |
1538 | charms *mgo.Collection |
1539 | machines *mgo.Collection |
1540 | |
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 | "launchpad.net/juju-core/state" |
1546 | "launchpad.net/juju-core/testing" |
1547 | jc "launchpad.net/juju-core/testing/checkers" |
1548 | + "launchpad.net/juju-core/testing/testbase" |
1549 | ) |
1550 | |
1551 | type InitializeSuite struct { |
1552 | testing.MgoSuite |
1553 | - testing.LoggingSuite |
1554 | + testbase.LoggingSuite |
1555 | State *state.State |
1556 | } |
1557 | |
1558 | |
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 | "launchpad.net/juju-core/state/multiwatcher" |
1564 | "launchpad.net/juju-core/state/watcher" |
1565 | "launchpad.net/juju-core/testing" |
1566 | + "launchpad.net/juju-core/testing/testbase" |
1567 | ) |
1568 | |
1569 | var dottedConfig = ` |
1570 | @@ -28,7 +29,7 @@ |
1571 | ` |
1572 | |
1573 | type storeManagerStateSuite struct { |
1574 | - testing.LoggingSuite |
1575 | + testbase.LoggingSuite |
1576 | testing.MgoSuite |
1577 | State *State |
1578 | } |
1579 | |
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 | |
1585 | "launchpad.net/juju-core/state/api/params" |
1586 | "launchpad.net/juju-core/state/watcher" |
1587 | - "launchpad.net/juju-core/testing" |
1588 | + "launchpad.net/juju-core/testing/testbase" |
1589 | ) |
1590 | |
1591 | func Test(t *stdtesting.T) { |
1592 | @@ -24,7 +24,7 @@ |
1593 | } |
1594 | |
1595 | type storeSuite struct { |
1596 | - testing.LoggingSuite |
1597 | + testbase.LoggingSuite |
1598 | } |
1599 | |
1600 | var _ = gc.Suite(&storeSuite{}) |
1601 | @@ -270,7 +270,7 @@ |
1602 | } |
1603 | |
1604 | type storeManagerSuite struct { |
1605 | - testing.LoggingSuite |
1606 | + testbase.LoggingSuite |
1607 | } |
1608 | |
1609 | var _ = gc.Suite(&storeManagerSuite{}) |
1610 | |
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 | |
1616 | "launchpad.net/juju-core/state/presence" |
1617 | "launchpad.net/juju-core/testing" |
1618 | + "launchpad.net/juju-core/testing/testbase" |
1619 | ) |
1620 | |
1621 | func TestPackage(t *stdtesting.T) { |
1622 | @@ -22,7 +23,7 @@ |
1623 | |
1624 | type PresenceSuite struct { |
1625 | testing.MgoSuite |
1626 | - testing.LoggingSuite |
1627 | + testbase.LoggingSuite |
1628 | presence *mgo.Collection |
1629 | pings *mgo.Collection |
1630 | } |
1631 | |
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 | "launchpad.net/juju-core/errors" |
1637 | "launchpad.net/juju-core/testing" |
1638 | jc "launchpad.net/juju-core/testing/checkers" |
1639 | + "launchpad.net/juju-core/testing/testbase" |
1640 | ) |
1641 | |
1642 | type SettingsSuite struct { |
1643 | - testing.LoggingSuite |
1644 | + testbase.LoggingSuite |
1645 | testing.MgoSuite |
1646 | state *State |
1647 | key string |
1648 | |
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 | |
1654 | "launchpad.net/juju-core/state/watcher" |
1655 | "launchpad.net/juju-core/testing" |
1656 | + "launchpad.net/juju-core/testing/testbase" |
1657 | ) |
1658 | |
1659 | // Test tuning parameters. |
1660 | @@ -46,7 +47,7 @@ |
1661 | |
1662 | type watcherSuite struct { |
1663 | testing.MgoSuite |
1664 | - testing.LoggingSuite |
1665 | + testbase.LoggingSuite |
1666 | |
1667 | log *mgo.Collection |
1668 | stash *mgo.Collection |
1669 | |
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 | "launchpad.net/juju-core/charm" |
1675 | "launchpad.net/juju-core/store" |
1676 | "launchpad.net/juju-core/testing" |
1677 | + "launchpad.net/juju-core/testing/testbase" |
1678 | ) |
1679 | |
1680 | func Test(t *stdtesting.T) { |
1681 | @@ -30,7 +31,7 @@ |
1682 | type StoreSuite struct { |
1683 | MgoSuite |
1684 | testing.HTTPSuite |
1685 | - testing.LoggingSuite |
1686 | + testbase.LoggingSuite |
1687 | store *store.Store |
1688 | } |
1689 | |
1690 | |
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 | gc "launchpad.net/gocheck" |
1696 | |
1697 | "launchpad.net/juju-core/testing" |
1698 | + "launchpad.net/juju-core/testing/testbase" |
1699 | ) |
1700 | |
1701 | type mgoSuite struct { |
1702 | - testing.LoggingSuite |
1703 | + testbase.LoggingSuite |
1704 | testing.MgoSuite |
1705 | } |
1706 | |
1707 | |
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 | // Copyright 2013 Canonical Ltd. |
1714 | // Licensed under the AGPLv3, see LICENCE file for details. |
1715 | |
1716 | -package testing |
1717 | +package testbase |
1718 | |
1719 | import ( |
1720 | gc "launchpad.net/gocheck" |
1721 | |
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 @@ |
1726 | -package testing_test |
1727 | +// Copyright 2013 Canonical Ltd. |
1728 | +// Licensed under the AGPLv3, see LICENCE file for details. |
1729 | + |
1730 | +package testbase_test |
1731 | |
1732 | import ( |
1733 | "os" |
1734 | |
1735 | gc "launchpad.net/gocheck" |
1736 | |
1737 | - "launchpad.net/juju-core/testing" |
1738 | + "launchpad.net/juju-core/testing/testbase" |
1739 | ) |
1740 | |
1741 | type cleanupSuite struct { |
1742 | - testing.CleanupSuite |
1743 | + testbase.CleanupSuite |
1744 | } |
1745 | |
1746 | var _ = gc.Suite(&cleanupSuite{}) |
1747 | |
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 | // Copyright 2013 Canonical Ltd. |
1753 | // Licensed under the AGPLv3, see LICENCE file for details. |
1754 | |
1755 | -package testing |
1756 | +package testbase |
1757 | |
1758 | import ( |
1759 | "go/build" |
1760 | |
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 | // Copyright 2012, 2013 Canonical Ltd. |
1766 | // Licensed under the AGPLv3, see LICENCE file for details. |
1767 | |
1768 | -package testing |
1769 | +package testbase |
1770 | |
1771 | import ( |
1772 | "fmt" |
1773 | |
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 @@ |
1778 | -package testing_test |
1779 | +// Copyright 2013 Canonical Ltd. |
1780 | +// Licensed under the AGPLv3, see LICENCE file for details. |
1781 | + |
1782 | +package testbase_test |
1783 | |
1784 | import ( |
1785 | gc "launchpad.net/gocheck" |
1786 | |
1787 | "launchpad.net/juju-core/log" |
1788 | - "launchpad.net/juju-core/testing" |
1789 | + "launchpad.net/juju-core/testing/testbase" |
1790 | ) |
1791 | |
1792 | var _ = gc.Suite(&logSuite{}) |
1793 | |
1794 | type logSuite struct { |
1795 | - testing.LoggingSuite |
1796 | + testbase.LoggingSuite |
1797 | } |
1798 | |
1799 | func (s *logSuite) SetUpSuite(c *gc.C) { |
1800 | |
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 | +// Copyright 2013 Canonical Ltd. |
1806 | +// Licensed under the AGPLv3, see LICENCE file for details. |
1807 | + |
1808 | +package testbase_test |
1809 | + |
1810 | +import ( |
1811 | + "testing" |
1812 | + |
1813 | + gc "launchpad.net/gocheck" |
1814 | + |
1815 | + "launchpad.net/juju-core/testing/testbase" |
1816 | +) |
1817 | + |
1818 | +func Test(t *testing.T) { |
1819 | + gc.TestingT(t) |
1820 | +} |
1821 | + |
1822 | +type DependencySuite struct{} |
1823 | + |
1824 | +var _ = gc.Suite(&DependencySuite{}) |
1825 | + |
1826 | +func (*DependencySuite) TestPackageDependencies(c *gc.C) { |
1827 | + // This test is to ensure we don't bring in any juju-core dependencies. |
1828 | + c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/testing/testbase"), |
1829 | + gc.HasLen, 0) |
1830 | +} |
1831 | |
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 @@ |
1836 | -package testing |
1837 | +// Copyright 2013 Canonical Ltd. |
1838 | +// Licensed under the AGPLv3, see LICENCE file for details. |
1839 | + |
1840 | +package testbase |
1841 | |
1842 | import ( |
1843 | "os" |
1844 | |
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 @@ |
1849 | -package testing_test |
1850 | +// Copyright 2013 Canonical Ltd. |
1851 | +// Licensed under the AGPLv3, see LICENCE file for details. |
1852 | + |
1853 | +package testbase_test |
1854 | |
1855 | import ( |
1856 | "errors" |
1857 | @@ -6,7 +9,7 @@ |
1858 | |
1859 | gc "launchpad.net/gocheck" |
1860 | |
1861 | - "launchpad.net/juju-core/testing" |
1862 | + "launchpad.net/juju-core/testing/testbase" |
1863 | ) |
1864 | |
1865 | type PatchValueSuite struct{} |
1866 | @@ -15,7 +18,7 @@ |
1867 | |
1868 | func (*PatchValueSuite) TestSetInt(c *gc.C) { |
1869 | i := 99 |
1870 | - restore := testing.PatchValue(&i, 88) |
1871 | + restore := testbase.PatchValue(&i, 88) |
1872 | c.Assert(i, gc.Equals, 88) |
1873 | restore() |
1874 | c.Assert(i, gc.Equals, 99) |
1875 | @@ -25,7 +28,7 @@ |
1876 | oldErr := errors.New("foo") |
1877 | newErr := errors.New("bar") |
1878 | err := oldErr |
1879 | - restore := testing.PatchValue(&err, newErr) |
1880 | + restore := testbase.PatchValue(&err, newErr) |
1881 | c.Assert(err, gc.Equals, newErr) |
1882 | restore() |
1883 | c.Assert(err, gc.Equals, oldErr) |
1884 | @@ -34,7 +37,7 @@ |
1885 | func (*PatchValueSuite) TestSetErrorToNil(c *gc.C) { |
1886 | oldErr := errors.New("foo") |
1887 | err := oldErr |
1888 | - restore := testing.PatchValue(&err, nil) |
1889 | + restore := testbase.PatchValue(&err, nil) |
1890 | c.Assert(err, gc.Equals, nil) |
1891 | restore() |
1892 | c.Assert(err, gc.Equals, oldErr) |
1893 | @@ -43,7 +46,7 @@ |
1894 | func (*PatchValueSuite) TestSetMapToNil(c *gc.C) { |
1895 | oldMap := map[string]int{"foo": 1234} |
1896 | m := oldMap |
1897 | - restore := testing.PatchValue(&m, nil) |
1898 | + restore := testbase.PatchValue(&m, nil) |
1899 | c.Assert(m, gc.IsNil) |
1900 | restore() |
1901 | c.Assert(m, gc.DeepEquals, oldMap) |
1902 | @@ -52,7 +55,7 @@ |
1903 | func (*PatchValueSuite) TestSetPanicsWhenNotAssignable(c *gc.C) { |
1904 | i := 99 |
1905 | type otherInt int |
1906 | - c.Assert(func() { testing.PatchValue(&i, otherInt(88)) }, gc.PanicMatches, `reflect\.Set: value of type testing_test\.otherInt is not assignable to type int`) |
1907 | + 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 | } |
1909 | |
1910 | type PatchEnvironmentSuite struct{} |
1911 | @@ -64,7 +67,7 @@ |
1912 | // remember the old value, and set it to something we can check |
1913 | oldValue := os.Getenv(envName) |
1914 | os.Setenv(envName, "initial") |
1915 | - restore := testing.PatchEnvironment(envName, "new value") |
1916 | + restore := testbase.PatchEnvironment(envName, "new value") |
1917 | // Using check to make sure the environment gets set back properly in the test. |
1918 | c.Check(os.Getenv(envName), gc.Equals, "new value") |
1919 | restore() |
1920 | |
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 | "launchpad.net/tomb" |
1926 | |
1927 | coretesting "launchpad.net/juju-core/testing" |
1928 | + "launchpad.net/juju-core/testing/testbase" |
1929 | "launchpad.net/juju-core/utils/fslock" |
1930 | ) |
1931 | |
1932 | @@ -25,7 +26,7 @@ |
1933 | } |
1934 | |
1935 | type fslockSuite struct { |
1936 | - coretesting.LoggingSuite |
1937 | + testbase.LoggingSuite |
1938 | lockDelay time.Duration |
1939 | } |
1940 | |
1941 | |
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 | "launchpad.net/juju-core/names" |
1947 | "launchpad.net/juju-core/testing" |
1948 | jc "launchpad.net/juju-core/testing/checkers" |
1949 | + "launchpad.net/juju-core/testing/testbase" |
1950 | "launchpad.net/juju-core/version" |
1951 | "launchpad.net/juju-core/worker/deployer" |
1952 | ) |
1953 | @@ -129,7 +130,7 @@ |
1954 | } |
1955 | |
1956 | type SimpleToolsFixture struct { |
1957 | - testing.LoggingSuite |
1958 | + testbase.LoggingSuite |
1959 | dataDir string |
1960 | initDir string |
1961 | logDir string |
1962 | |
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 | "launchpad.net/juju-core/state/watcher" |
1968 | coretesting "launchpad.net/juju-core/testing" |
1969 | jc "launchpad.net/juju-core/testing/checkers" |
1970 | + "launchpad.net/juju-core/testing/testbase" |
1971 | "launchpad.net/juju-core/worker" |
1972 | ) |
1973 | |
1974 | type notifyWorkerSuite struct { |
1975 | - coretesting.LoggingSuite |
1976 | + testbase.LoggingSuite |
1977 | worker worker.Worker |
1978 | actor *notifyHandler |
1979 | } |
1980 | |
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 | "launchpad.net/juju-core/state" |
1986 | coretesting "launchpad.net/juju-core/testing" |
1987 | jc "launchpad.net/juju-core/testing/checkers" |
1988 | + "launchpad.net/juju-core/testing/testbase" |
1989 | coretools "launchpad.net/juju-core/tools" |
1990 | "launchpad.net/juju-core/version" |
1991 | "launchpad.net/juju-core/worker/provisioner" |
1992 | ) |
1993 | |
1994 | type lxcSuite struct { |
1995 | - coretesting.LoggingSuite |
1996 | + testbase.LoggingSuite |
1997 | lxc.TestSuite |
1998 | events chan mock.Event |
1999 | } |
2000 | |
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 | gc "launchpad.net/gocheck" |
2006 | "launchpad.net/tomb" |
2007 | |
2008 | - coretesting "launchpad.net/juju-core/testing" |
2009 | + "launchpad.net/juju-core/testing/testbase" |
2010 | "launchpad.net/juju-core/worker" |
2011 | ) |
2012 | |
2013 | type runnerSuite struct { |
2014 | - coretesting.LoggingSuite |
2015 | + testbase.LoggingSuite |
2016 | restartDelay time.Duration |
2017 | } |
2018 | |
2019 | |
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 | "launchpad.net/juju-core/state/watcher" |
2025 | coretesting "launchpad.net/juju-core/testing" |
2026 | jc "launchpad.net/juju-core/testing/checkers" |
2027 | + "launchpad.net/juju-core/testing/testbase" |
2028 | "launchpad.net/juju-core/worker" |
2029 | ) |
2030 | |
2031 | type stringsWorkerSuite struct { |
2032 | - coretesting.LoggingSuite |
2033 | + testbase.LoggingSuite |
2034 | worker worker.Worker |
2035 | actor *stringsHandler |
2036 | } |
2037 | |
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 | corecharm "launchpad.net/juju-core/charm" |
2043 | "launchpad.net/juju-core/testing" |
2044 | jc "launchpad.net/juju-core/testing/checkers" |
2045 | + "launchpad.net/juju-core/testing/testbase" |
2046 | "launchpad.net/juju-core/worker/uniter/charm" |
2047 | ) |
2048 | |
2049 | @@ -21,7 +22,7 @@ |
2050 | |
2051 | type GitDirSuite struct { |
2052 | testing.GitSuite |
2053 | - LoggingSuite testing.LoggingSuite |
2054 | + LoggingSuite testbase.LoggingSuite |
2055 | } |
2056 | |
2057 | var _ = gc.Suite(&GitDirSuite{}) |
2058 | |
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 | |
2064 | gc "launchpad.net/gocheck" |
2065 | |
2066 | - "launchpad.net/juju-core/testing" |
2067 | jc "launchpad.net/juju-core/testing/checkers" |
2068 | + "launchpad.net/juju-core/testing/testbase" |
2069 | ) |
2070 | |
2071 | type DebugHooksServerSuite struct { |
2072 | - testing.LoggingSuite |
2073 | + testbase.LoggingSuite |
2074 | ctx *HooksContext |
2075 | fakebin string |
2076 | tmpdir string |
2077 | |
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 | "launchpad.net/juju-core/cmd" |
2083 | "launchpad.net/juju-core/testing" |
2084 | jc "launchpad.net/juju-core/testing/checkers" |
2085 | + "launchpad.net/juju-core/testing/testbase" |
2086 | "launchpad.net/juju-core/worker/uniter/jujuc" |
2087 | ) |
2088 | |
2089 | @@ -69,7 +70,7 @@ |
2090 | } |
2091 | |
2092 | type ServerSuite struct { |
2093 | - testing.LoggingSuite |
2094 | + testbase.LoggingSuite |
2095 | server *jujuc.Server |
2096 | sockPath string |
2097 | 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/