Merge lp:~thumper/juju-core/testbase into lp:~go-bot/juju-core/trunk

Proposed by Tim Penhey
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
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.

https://codereview.appspot.com/13694046/

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.

https://codereview.appspot.com/13694046/

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :
Download full text (3.6 KiB)

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):
   A [revision details]
   M agent/agent_test.go
   M agent/format-1.12_whitebox_test.go
   M agent/format-1.16_whitebox_test.go
   M agent/format_whitebox_test.go
   M agent/tools/diskmanager_test.go
   M agent/tools/tools_test.go
   M charm/dir_test.go
   M charm/repo_test.go
   M cmd/juju/bootstrap_test.go
   M cmd/juju/plugin_test.go
   M cmd/juju/publish_test.go
   M cmd/juju/synctools_test.go
   M cmd/jujud/agent_test.go
   M cmd/jujud/bootstrap_test.go
   M cmd/jujud/machine_test.go
   M cmd/logging_test.go
   M container/lxc/lxc_test.go
   M downloader/downloader_test.go
   M environs/bootstrap/bootstrap_test.go
   M environs/cert_internal_test.go
   M environs/cert_test.go
   M environs/cloudinit/cloudinit_test.go
   M environs/cloudinit_test.go
   M environs/config/config_test.go
   M environs/httpstorage/backend_test.go
   M environs/imagemetadata/validation_test.go
   M environs/instances/image_test.go
   M environs/instances/instancetype_test.go
   M environs/jujutest/livetests.go
   M environs/jujutest/tests.go
   M environs/manual/detection_test.go
   M environs/mongo_test.go
   M environs/simplestreams/testing/testing.go
   M environs/sshstorage/storage_test.go
   M environs/sync/sync_test.go
   M environs/tools/build_test.go
   M environs/tools/storage_test.go
   M environs/tools/tools_test.go
   M environs/tools/validation_test.go
   M instance/address_test.go
   M juju/apiconn_test.go
   M juju/conn_test.go
   M juju/osenv/package_test.go
   M juju/osenv/vars_linux_test.go
   M juju/osenv/vars_windows_test.go
   M juju/testing/conn.go
   M provider/azure/azure_test.go
   M provider/azure/config_test.go
   M provider/azure/customdata_test.go
   M provider/ec2/config_test.go
   M provider/ec2/image_test.go
   M provider/ec2/live_test.go
   M provider/ec2/local_test.go
   M provider/local/environprovider_test.go
   M provider/local/local_test.go
   M provider/local/prereqs_test.go
   M provider/maas/config_test.go
   M provider/maas/maas_test.go
   M provider/openstack/config_test.go
   M provider/openstack/live_test.go
   M provider/openstack/local_test.go
   M provider/state_test.go
   M rpc/jsoncodec/codec_test.go
   M rpc/rpc_test.go
   M state/apiserver/common/errors_test.go
   M state/conn_test.go
   M state/initialize_test.go
   M state/megawatcher_internal_test.go
   M state/multiwatcher/multiwatcher_internal_test.go
   M state/presence/presence_test.go
   M state/settings_test.go
   M state/watcher/watcher_test.go
   M store/store_test.go
   M testing/mgo_test.go
   M testing/testbase/cleanup.go
   M testing/testbase/cleanup_test.go
   M testing/testbase/imports.go
   M testing/testbase/log.go
   M testing/testbase/...

Read more...

Revision history for this message
Andrew Wilkins (axwalk) wrote :

LGTM, just one question about dependencies.

https://codereview.appspot.com/13694046/diff/1/testing/testbase/package_test.go
File testing/testbase/package_test.go (right):

https://codereview.appspot.com/13694046/diff/1/testing/testbase/package_test.go#newcode23
testing/testbase/package_test.go:23: // This test is to ensure we don't
bring in any juju-core dependencies.
Glad to have this here. Is it okay for testbase to import
testing/checkers?

https://codereview.appspot.com/13694046/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'agent/agent_test.go'
--- agent/agent_test.go 2013-08-22 21:27:08 +0000
+++ agent/agent_test.go 2013-09-20 02:56:01 +0000
@@ -7,11 +7,11 @@
7 gc "launchpad.net/gocheck"7 gc "launchpad.net/gocheck"
88
9 "launchpad.net/juju-core/agent"9 "launchpad.net/juju-core/agent"
10 coretesting "launchpad.net/juju-core/testing"10 "launchpad.net/juju-core/testing/testbase"
11)11)
1212
13type suite struct {13type suite struct {
14 coretesting.LoggingSuite14 testbase.LoggingSuite
15}15}
1616
17var _ = gc.Suite(&suite{})17var _ = gc.Suite(&suite{})
1818
=== modified file 'agent/format-1.12_whitebox_test.go'
--- agent/format-1.12_whitebox_test.go 2013-09-02 04:08:52 +0000
+++ agent/format-1.12_whitebox_test.go 2013-09-20 02:56:01 +0000
@@ -9,12 +9,12 @@
99
10 gc "launchpad.net/gocheck"10 gc "launchpad.net/gocheck"
1111
12 "launchpad.net/juju-core/testing"
13 jc "launchpad.net/juju-core/testing/checkers"12 jc "launchpad.net/juju-core/testing/checkers"
13 "launchpad.net/juju-core/testing/testbase"
14)14)
1515
16type format_1_12Suite struct {16type format_1_12Suite struct {
17 testing.LoggingSuite17 testbase.LoggingSuite
18 formatter formatter_1_1218 formatter formatter_1_12
19}19}
2020
2121
=== modified file 'agent/format-1.16_whitebox_test.go'
--- agent/format-1.16_whitebox_test.go 2013-09-19 02:17:33 +0000
+++ agent/format-1.16_whitebox_test.go 2013-09-20 02:56:01 +0000
@@ -14,12 +14,12 @@
14 gc "launchpad.net/gocheck"14 gc "launchpad.net/gocheck"
1515
16 "launchpad.net/juju-core/juju/osenv"16 "launchpad.net/juju-core/juju/osenv"
17 "launchpad.net/juju-core/testing"
18 jc "launchpad.net/juju-core/testing/checkers"17 jc "launchpad.net/juju-core/testing/checkers"
18 "launchpad.net/juju-core/testing/testbase"
19)19)
2020
21type format_1_16Suite struct {21type format_1_16Suite struct {
22 testing.LoggingSuite22 testbase.LoggingSuite
23 formatter formatter_1_1623 formatter formatter_1_16
24}24}
2525
2626
=== modified file 'agent/format_whitebox_test.go'
--- agent/format_whitebox_test.go 2013-09-02 04:08:52 +0000
+++ agent/format_whitebox_test.go 2013-09-20 02:56:01 +0000
@@ -9,11 +9,11 @@
99
10 gc "launchpad.net/gocheck"10 gc "launchpad.net/gocheck"
1111
12 "launchpad.net/juju-core/testing"12 "launchpad.net/juju-core/testing/testbase"
13)13)
1414
15type formatSuite struct {15type formatSuite struct {
16 testing.LoggingSuite16 testbase.LoggingSuite
17}17}
1818
19var _ = gc.Suite(&formatSuite{})19var _ = gc.Suite(&formatSuite{})
2020
=== modified file 'agent/tools/diskmanager_test.go'
--- agent/tools/diskmanager_test.go 2013-08-22 21:59:32 +0000
+++ agent/tools/diskmanager_test.go 2013-09-20 02:56:01 +0000
@@ -11,6 +11,7 @@
1111
12 agenttools "launchpad.net/juju-core/agent/tools"12 agenttools "launchpad.net/juju-core/agent/tools"
13 coretesting "launchpad.net/juju-core/testing"13 coretesting "launchpad.net/juju-core/testing"
14 "launchpad.net/juju-core/testing/testbase"
14 coretools "launchpad.net/juju-core/tools"15 coretools "launchpad.net/juju-core/tools"
15 "launchpad.net/juju-core/version"16 "launchpad.net/juju-core/version"
16)17)
@@ -20,7 +21,7 @@
20var _ agenttools.ToolsManager = (*agenttools.DiskManager)(nil)21var _ agenttools.ToolsManager = (*agenttools.DiskManager)(nil)
2122
22type DiskManagerSuite struct {23type DiskManagerSuite struct {
23 coretesting.LoggingSuite24 testbase.LoggingSuite
24 dataDir string25 dataDir string
25 manager agenttools.ToolsManager26 manager agenttools.ToolsManager
26}27}
2728
=== modified file 'agent/tools/tools_test.go'
--- agent/tools/tools_test.go 2013-08-22 21:59:32 +0000
+++ agent/tools/tools_test.go 2013-09-20 02:56:01 +0000
@@ -14,12 +14,13 @@
1414
15 agenttools "launchpad.net/juju-core/agent/tools"15 agenttools "launchpad.net/juju-core/agent/tools"
16 "launchpad.net/juju-core/testing"16 "launchpad.net/juju-core/testing"
17 "launchpad.net/juju-core/testing/testbase"
17 coretest "launchpad.net/juju-core/tools"18 coretest "launchpad.net/juju-core/tools"
18 "launchpad.net/juju-core/version"19 "launchpad.net/juju-core/version"
19)20)
2021
21type ToolsSuite struct {22type ToolsSuite struct {
22 testing.LoggingSuite23 testbase.LoggingSuite
23 dataDir string24 dataDir string
24}25}
2526
@@ -35,7 +36,7 @@
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.
36 // Only imports that start with "launchpad.net/juju-core" are checked, and the37 // Only imports that start with "launchpad.net/juju-core" are checked, and the
37 // resulting slice has that prefix removed to keep the output short.38 // resulting slice has that prefix removed to keep the output short.
38 c.Assert(testing.FindJujuCoreImports(c, "launchpad.net/juju-core/agent/tools"),39 c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/agent/tools"),
39 gc.DeepEquals,40 gc.DeepEquals,
40 []string{"tools", "version"})41 []string{"tools", "version"})
41}42}
4243
=== modified file 'charm/dir_test.go'
--- charm/dir_test.go 2013-08-19 11:17:19 +0000
+++ charm/dir_test.go 2013-09-20 02:56:01 +0000
@@ -17,10 +17,11 @@
1717
18 "launchpad.net/juju-core/charm"18 "launchpad.net/juju-core/charm"
19 "launchpad.net/juju-core/testing"19 "launchpad.net/juju-core/testing"
20 "launchpad.net/juju-core/testing/testbase"
20)21)
2122
22type DirSuite struct {23type DirSuite struct {
23 testing.LoggingSuite24 testbase.LoggingSuite
24}25}
2526
26var _ = gc.Suite(&DirSuite{})27var _ = gc.Suite(&DirSuite{})
2728
=== modified file 'charm/repo_test.go'
--- charm/repo_test.go 2013-08-19 11:17:19 +0000
+++ charm/repo_test.go 2013-09-20 02:56:01 +0000
@@ -20,6 +20,7 @@
2020
21 "launchpad.net/juju-core/charm"21 "launchpad.net/juju-core/charm"
22 "launchpad.net/juju-core/testing"22 "launchpad.net/juju-core/testing"
23 "launchpad.net/juju-core/testing/testbase"
23)24)
2425
25type MockStore struct {26type MockStore struct {
@@ -151,7 +152,7 @@
151}152}
152153
153type StoreSuite struct {154type StoreSuite struct {
154 testing.LoggingSuite155 testbase.LoggingSuite
155 server *MockStore156 server *MockStore
156 store *charm.CharmStore157 store *charm.CharmStore
157 oldCacheDir string158 oldCacheDir string
@@ -172,7 +173,7 @@
172 s.server.downloads = nil173 s.server.downloads = nil
173}174}
174175
175// Uses the TearDownTest from testing.LoggingSuite176// Uses the TearDownTest from testbase.LoggingSuite
176177
177func (s *StoreSuite) TearDownSuite(c *gc.C) {178func (s *StoreSuite) TearDownSuite(c *gc.C) {
178 charm.CacheDir = s.oldCacheDir179 charm.CacheDir = s.oldCacheDir
@@ -392,7 +393,7 @@
392}393}
393394
394type LocalRepoSuite struct {395type LocalRepoSuite struct {
395 testing.LoggingSuite396 testbase.LoggingSuite
396 repo *charm.LocalRepository397 repo *charm.LocalRepository
397 seriesPath string398 seriesPath string
398}399}
399400
=== modified file 'cmd/juju/bootstrap_test.go'
--- cmd/juju/bootstrap_test.go 2013-09-20 00:52:13 +0000
+++ cmd/juju/bootstrap_test.go 2013-09-20 02:56:01 +0000
@@ -23,12 +23,13 @@
23 "launchpad.net/juju-core/errors"23 "launchpad.net/juju-core/errors"
24 "launchpad.net/juju-core/provider/dummy"24 "launchpad.net/juju-core/provider/dummy"
25 coretesting "launchpad.net/juju-core/testing"25 coretesting "launchpad.net/juju-core/testing"
26 "launchpad.net/juju-core/testing/testbase"
26 coretools "launchpad.net/juju-core/tools"27 coretools "launchpad.net/juju-core/tools"
27 "launchpad.net/juju-core/version"28 "launchpad.net/juju-core/version"
28)29)
2930
30type BootstrapSuite struct {31type BootstrapSuite struct {
31 coretesting.LoggingSuite32 testbase.LoggingSuite
32 coretesting.MgoSuite33 coretesting.MgoSuite
33 envtesting.ToolsFixture34 envtesting.ToolsFixture
34}35}
3536
=== modified file 'cmd/juju/plugin_test.go'
--- cmd/juju/plugin_test.go 2013-09-13 14:48:13 +0000
+++ cmd/juju/plugin_test.go 2013-09-20 02:56:01 +0000
@@ -15,10 +15,11 @@
1515
16 "launchpad.net/juju-core/testing"16 "launchpad.net/juju-core/testing"
17 jc "launchpad.net/juju-core/testing/checkers"17 jc "launchpad.net/juju-core/testing/checkers"
18 "launchpad.net/juju-core/testing/testbase"
18)19)
1920
20type PluginSuite struct {21type PluginSuite struct {
21 testing.LoggingSuite22 testbase.LoggingSuite
22 oldPath string23 oldPath string
23 home *testing.FakeHome24 home *testing.FakeHome
24}25}
2526
=== modified file 'cmd/juju/publish_test.go'
--- cmd/juju/publish_test.go 2013-09-13 14:48:13 +0000
+++ cmd/juju/publish_test.go 2013-09-20 02:56:01 +0000
@@ -13,12 +13,13 @@
13 "launchpad.net/juju-core/charm"13 "launchpad.net/juju-core/charm"
14 "launchpad.net/juju-core/cmd"14 "launchpad.net/juju-core/cmd"
15 "launchpad.net/juju-core/testing"15 "launchpad.net/juju-core/testing"
16 "launchpad.net/juju-core/testing/testbase"
16)17)
1718
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.
1920
20type PublishSuite struct {21type PublishSuite struct {
21 testing.LoggingSuite22 testbase.LoggingSuite
22 testing.HTTPSuite23 testing.HTTPSuite
2324
24 home *testing.FakeHome25 home *testing.FakeHome
2526
=== modified file 'cmd/juju/synctools_test.go'
--- cmd/juju/synctools_test.go 2013-09-13 04:16:42 +0000
+++ cmd/juju/synctools_test.go 2013-09-20 02:56:01 +0000
@@ -15,10 +15,11 @@
15 "launchpad.net/juju-core/provider/dummy"15 "launchpad.net/juju-core/provider/dummy"
16 coretesting "launchpad.net/juju-core/testing"16 coretesting "launchpad.net/juju-core/testing"
17 jc "launchpad.net/juju-core/testing/checkers"17 jc "launchpad.net/juju-core/testing/checkers"
18 "launchpad.net/juju-core/testing/testbase"
18)19)
1920
20type syncToolsSuite struct {21type syncToolsSuite struct {
21 coretesting.LoggingSuite22 testbase.LoggingSuite
22 home *coretesting.FakeHome23 home *coretesting.FakeHome
23 targetEnv environs.Environ24 targetEnv environs.Environ
24 localStorage string25 localStorage string
2526
=== modified file 'cmd/jujud/agent_test.go'
--- cmd/jujud/agent_test.go 2013-09-18 22:54:32 +0000
+++ cmd/jujud/agent_test.go 2013-09-20 02:56:01 +0000
@@ -23,6 +23,7 @@
23 "launchpad.net/juju-core/state/api/params"23 "launchpad.net/juju-core/state/api/params"
24 coretesting "launchpad.net/juju-core/testing"24 coretesting "launchpad.net/juju-core/testing"
25 jc "launchpad.net/juju-core/testing/checkers"25 jc "launchpad.net/juju-core/testing/checkers"
26 "launchpad.net/juju-core/testing/testbase"
26 coretools "launchpad.net/juju-core/tools"27 coretools "launchpad.net/juju-core/tools"
27 "launchpad.net/juju-core/version"28 "launchpad.net/juju-core/version"
28 "launchpad.net/juju-core/worker"29 "launchpad.net/juju-core/worker"
@@ -32,7 +33,7 @@
32var _ = gc.Suite(&toolSuite{})33var _ = gc.Suite(&toolSuite{})
3334
34type toolSuite struct {35type toolSuite struct {
35 coretesting.LoggingSuite36 testbase.LoggingSuite
36}37}
3738
38var errorImportanceTests = []error{39var errorImportanceTests = []error{
3940
=== modified file 'cmd/jujud/bootstrap_test.go'
--- cmd/jujud/bootstrap_test.go 2013-09-12 12:38:04 +0000
+++ cmd/jujud/bootstrap_test.go 2013-09-20 02:56:01 +0000
@@ -20,13 +20,14 @@
20 "launchpad.net/juju-core/provider/dummy"20 "launchpad.net/juju-core/provider/dummy"
21 "launchpad.net/juju-core/state"21 "launchpad.net/juju-core/state"
22 "launchpad.net/juju-core/testing"22 "launchpad.net/juju-core/testing"
23 "launchpad.net/juju-core/testing/testbase"
23 "launchpad.net/juju-core/utils"24 "launchpad.net/juju-core/utils"
24)25)
2526
26// We don't want to use JujuConnSuite because it gives us27// We don't want to use JujuConnSuite because it gives us
27// an already-bootstrapped environment.28// an already-bootstrapped environment.
28type BootstrapSuite struct {29type BootstrapSuite struct {
29 testing.LoggingSuite30 testbase.LoggingSuite
30 testing.MgoSuite31 testing.MgoSuite
31 dataDir string32 dataDir string
32 providerStateURLFile string33 providerStateURLFile string
3334
=== modified file 'cmd/jujud/machine_test.go'
--- cmd/jujud/machine_test.go 2013-09-19 14:48:05 +0000
+++ cmd/jujud/machine_test.go 2013-09-20 02:56:01 +0000
@@ -25,6 +25,7 @@
25 "launchpad.net/juju-core/state/watcher"25 "launchpad.net/juju-core/state/watcher"
26 "launchpad.net/juju-core/testing"26 "launchpad.net/juju-core/testing"
27 jc "launchpad.net/juju-core/testing/checkers"27 jc "launchpad.net/juju-core/testing/checkers"
28 "launchpad.net/juju-core/testing/testbase"
28 "launchpad.net/juju-core/tools"29 "launchpad.net/juju-core/tools"
29 "launchpad.net/juju-core/version"30 "launchpad.net/juju-core/version"
30 "launchpad.net/juju-core/worker/deployer"31 "launchpad.net/juju-core/worker/deployer"
@@ -40,7 +41,7 @@
40func (s *MachineSuite) SetUpSuite(c *gc.C) {41func (s *MachineSuite) SetUpSuite(c *gc.C) {
41 s.agentSuite.SetUpSuite(c)42 s.agentSuite.SetUpSuite(c)
42 s.TestSuite.SetUpSuite(c)43 s.TestSuite.SetUpSuite(c)
43 restore := testing.PatchValue(&charm.CacheDir, c.MkDir())44 restore := testbase.PatchValue(&charm.CacheDir, c.MkDir())
44 s.AddSuiteCleanup(func(*gc.C) { restore() })45 s.AddSuiteCleanup(func(*gc.C) { restore() })
45}46}
4647
4748
=== modified file 'cmd/logging_test.go'
--- cmd/logging_test.go 2013-09-19 02:17:33 +0000
+++ cmd/logging_test.go 2013-09-20 02:56:01 +0000
@@ -13,12 +13,13 @@
13 "launchpad.net/juju-core/cmd"13 "launchpad.net/juju-core/cmd"
14 "launchpad.net/juju-core/juju/osenv"14 "launchpad.net/juju-core/juju/osenv"
15 "launchpad.net/juju-core/testing"15 "launchpad.net/juju-core/testing"
16 "launchpad.net/juju-core/testing/testbase"
16)17)
1718
18var logger = loggo.GetLogger("juju.test")19var logger = loggo.GetLogger("juju.test")
1920
20type LogSuite struct {21type LogSuite struct {
21 testing.CleanupSuite22 testbase.CleanupSuite
22}23}
2324
24var _ = gc.Suite(&LogSuite{})25var _ = gc.Suite(&LogSuite{})
@@ -59,7 +60,7 @@
5960
60func (s *LogSuite) TestLogConfigFromEnvironment(c *gc.C) {61func (s *LogSuite) TestLogConfigFromEnvironment(c *gc.C) {
61 config := "juju.cmd=INFO;juju.worker.deployer=DEBUG"62 config := "juju.cmd=INFO;juju.worker.deployer=DEBUG"
62 testing.PatchEnvironment(osenv.JujuLoggingConfig, config)63 testbase.PatchEnvironment(osenv.JujuLoggingConfig, config)
63 log := newLogWithFlags(c, []string{})64 log := newLogWithFlags(c, []string{})
64 c.Assert(log.Path, gc.Equals, "")65 c.Assert(log.Path, gc.Equals, "")
65 c.Assert(log.Verbose, gc.Equals, false)66 c.Assert(log.Verbose, gc.Equals, false)
6667
=== modified file 'container/lxc/lxc_test.go'
--- container/lxc/lxc_test.go 2013-09-19 03:23:04 +0000
+++ container/lxc/lxc_test.go 2013-09-20 02:56:01 +0000
@@ -21,6 +21,7 @@
21 jujutesting "launchpad.net/juju-core/juju/testing"21 jujutesting "launchpad.net/juju-core/juju/testing"
22 "launchpad.net/juju-core/testing"22 "launchpad.net/juju-core/testing"
23 jc "launchpad.net/juju-core/testing/checkers"23 jc "launchpad.net/juju-core/testing/checkers"
24 "launchpad.net/juju-core/testing/testbase"
24 "launchpad.net/juju-core/tools"25 "launchpad.net/juju-core/tools"
25 "launchpad.net/juju-core/version"26 "launchpad.net/juju-core/version"
26)27)
@@ -30,7 +31,7 @@
30}31}
3132
32type LxcSuite struct {33type LxcSuite struct {
33 testing.LoggingSuite34 testbase.LoggingSuite
34 lxc.TestSuite35 lxc.TestSuite
35 oldPath string36 oldPath string
36}37}
@@ -217,7 +218,7 @@
217}218}
218219
219type NetworkSuite struct {220type NetworkSuite struct {
220 testing.LoggingSuite221 testbase.LoggingSuite
221}222}
222223
223var _ = gc.Suite(&NetworkSuite{})224var _ = gc.Suite(&NetworkSuite{})
224225
=== modified file 'downloader/downloader_test.go'
--- downloader/downloader_test.go 2013-08-19 11:17:19 +0000
+++ downloader/downloader_test.go 2013-09-20 02:56:01 +0000
@@ -14,10 +14,11 @@
1414
15 "launchpad.net/juju-core/downloader"15 "launchpad.net/juju-core/downloader"
16 "launchpad.net/juju-core/testing"16 "launchpad.net/juju-core/testing"
17 "launchpad.net/juju-core/testing/testbase"
17)18)
1819
19type suite struct {20type suite struct {
20 testing.LoggingSuite21 testbase.LoggingSuite
21 testing.HTTPSuite22 testing.HTTPSuite
22}23}
2324
2425
=== modified file 'environs/bootstrap/bootstrap_test.go'
--- environs/bootstrap/bootstrap_test.go 2013-09-19 00:22:15 +0000
+++ environs/bootstrap/bootstrap_test.go 2013-09-20 02:56:01 +0000
@@ -17,6 +17,7 @@
17 envtesting "launchpad.net/juju-core/environs/testing"17 envtesting "launchpad.net/juju-core/environs/testing"
18 "launchpad.net/juju-core/provider/dummy"18 "launchpad.net/juju-core/provider/dummy"
19 coretesting "launchpad.net/juju-core/testing"19 coretesting "launchpad.net/juju-core/testing"
20 "launchpad.net/juju-core/testing/testbase"
20 "launchpad.net/juju-core/tools"21 "launchpad.net/juju-core/tools"
21 "launchpad.net/juju-core/version"22 "launchpad.net/juju-core/version"
22)23)
@@ -32,7 +33,7 @@
3233
33type bootstrapSuite struct {34type bootstrapSuite struct {
34 home *coretesting.FakeHome35 home *coretesting.FakeHome
35 coretesting.LoggingSuite36 testbase.LoggingSuite
36 envtesting.ToolsFixture37 envtesting.ToolsFixture
37}38}
3839
3940
=== modified file 'environs/cert_internal_test.go'
--- environs/cert_internal_test.go 2013-08-19 16:10:25 +0000
+++ environs/cert_internal_test.go 2013-09-20 02:56:01 +0000
@@ -8,11 +8,12 @@
88
9 "launchpad.net/juju-core/cert"9 "launchpad.net/juju-core/cert"
10 "launchpad.net/juju-core/testing"10 "launchpad.net/juju-core/testing"
11 "launchpad.net/juju-core/testing/testbase"
11)12)
1213
13// EnvironsCertSuite tests the internal functions defined in environs/cert.go14// EnvironsCertSuite tests the internal functions defined in environs/cert.go
14type EnvironsCertSuite struct {15type EnvironsCertSuite struct {
15 testing.LoggingSuite16 testbase.LoggingSuite
16}17}
1718
18var _ = gc.Suite(&EnvironsCertSuite{})19var _ = gc.Suite(&EnvironsCertSuite{})
1920
=== modified file 'environs/cert_test.go'
--- environs/cert_test.go 2013-08-19 16:11:44 +0000
+++ environs/cert_test.go 2013-09-20 02:56:01 +0000
@@ -11,10 +11,11 @@
11 "launchpad.net/juju-core/environs"11 "launchpad.net/juju-core/environs"
12 "launchpad.net/juju-core/environs/config"12 "launchpad.net/juju-core/environs/config"
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing"
14 "launchpad.net/juju-core/testing/testbase"
14)15)
1516
16type EnvironsCertSuite struct {17type EnvironsCertSuite struct {
17 testing.LoggingSuite18 testbase.LoggingSuite
18}19}
1920
20var _ = gc.Suite(&EnvironsCertSuite{})21var _ = gc.Suite(&EnvironsCertSuite{})
2122
=== modified file 'environs/cloudinit/cloudinit_test.go'
--- environs/cloudinit/cloudinit_test.go 2013-09-16 23:06:44 +0000
+++ environs/cloudinit/cloudinit_test.go 2013-09-20 02:56:01 +0000
@@ -20,6 +20,7 @@
20 "launchpad.net/juju-core/state"20 "launchpad.net/juju-core/state"
21 "launchpad.net/juju-core/state/api"21 "launchpad.net/juju-core/state/api"
22 "launchpad.net/juju-core/testing"22 "launchpad.net/juju-core/testing"
23 "launchpad.net/juju-core/testing/testbase"
23 "launchpad.net/juju-core/tools"24 "launchpad.net/juju-core/tools"
24 "launchpad.net/juju-core/version"25 "launchpad.net/juju-core/version"
25)26)
@@ -27,7 +28,7 @@
27// Use local suite since this file lives in the ec2 package28// Use local suite since this file lives in the ec2 package
28// for testing internals.29// for testing internals.
29type cloudinitSuite struct {30type cloudinitSuite struct {
30 testing.LoggingSuite31 testbase.LoggingSuite
31}32}
3233
33var _ = gc.Suite(&cloudinitSuite{})34var _ = gc.Suite(&cloudinitSuite{})
3435
=== modified file 'environs/cloudinit_test.go'
--- environs/cloudinit_test.go 2013-09-12 21:32:12 +0000
+++ environs/cloudinit_test.go 2013-09-20 02:56:01 +0000
@@ -19,6 +19,7 @@
19 "launchpad.net/juju-core/state"19 "launchpad.net/juju-core/state"
20 "launchpad.net/juju-core/state/api"20 "launchpad.net/juju-core/state/api"
21 "launchpad.net/juju-core/testing"21 "launchpad.net/juju-core/testing"
22 "launchpad.net/juju-core/testing/testbase"
22 "launchpad.net/juju-core/tools"23 "launchpad.net/juju-core/tools"
23 "launchpad.net/juju-core/utils"24 "launchpad.net/juju-core/utils"
24 "launchpad.net/juju-core/version"25 "launchpad.net/juju-core/version"
@@ -34,7 +35,7 @@
34}35}
3536
36type CloudInitSuite struct {37type CloudInitSuite struct {
37 testing.LoggingSuite38 testbase.LoggingSuite
38}39}
3940
40var _ = gc.Suite(&CloudInitSuite{})41var _ = gc.Suite(&CloudInitSuite{})
4142
=== modified file 'environs/config/config_test.go'
--- environs/config/config_test.go 2013-09-19 02:17:33 +0000
+++ environs/config/config_test.go 2013-09-20 02:56:01 +0000
@@ -17,6 +17,7 @@
17 "launchpad.net/juju-core/schema"17 "launchpad.net/juju-core/schema"
18 "launchpad.net/juju-core/testing"18 "launchpad.net/juju-core/testing"
19 jc "launchpad.net/juju-core/testing/checkers"19 jc "launchpad.net/juju-core/testing/checkers"
20 "launchpad.net/juju-core/testing/testbase"
20 "launchpad.net/juju-core/version"21 "launchpad.net/juju-core/version"
21)22)
2223
@@ -25,7 +26,7 @@
25}26}
2627
27type ConfigSuite struct {28type ConfigSuite struct {
28 testing.LoggingSuite29 testbase.LoggingSuite
29 home string30 home string
30}31}
3132
3233
=== modified file 'environs/httpstorage/backend_test.go'
--- environs/httpstorage/backend_test.go 2013-09-19 03:14:56 +0000
+++ environs/httpstorage/backend_test.go 2013-09-20 02:56:01 +0000
@@ -18,7 +18,7 @@
1818
19 "launchpad.net/juju-core/environs/filestorage"19 "launchpad.net/juju-core/environs/filestorage"
20 "launchpad.net/juju-core/environs/httpstorage"20 "launchpad.net/juju-core/environs/httpstorage"
21 "launchpad.net/juju-core/testing"21 "launchpad.net/juju-core/testing/testbase"
22)22)
2323
24func TestLocal(t *stdtesting.T) {24func TestLocal(t *stdtesting.T) {
@@ -26,7 +26,7 @@
26}26}
2727
28type backendSuite struct {28type backendSuite struct {
29 testing.LoggingSuite29 testbase.LoggingSuite
30}30}
3131
32var _ = gc.Suite(&backendSuite{})32var _ = gc.Suite(&backendSuite{})
3333
=== modified file 'environs/imagemetadata/validation_test.go'
--- environs/imagemetadata/validation_test.go 2013-09-12 00:17:20 +0000
+++ environs/imagemetadata/validation_test.go 2013-09-20 02:56:01 +0000
@@ -10,10 +10,11 @@
10 "launchpad.net/juju-core/environs/imagemetadata"10 "launchpad.net/juju-core/environs/imagemetadata"
11 "launchpad.net/juju-core/environs/simplestreams"11 "launchpad.net/juju-core/environs/simplestreams"
12 coretesting "launchpad.net/juju-core/testing"12 coretesting "launchpad.net/juju-core/testing"
13 "launchpad.net/juju-core/testing/testbase"
13)14)
1415
15type ValidateSuite struct {16type ValidateSuite struct {
16 coretesting.LoggingSuite17 testbase.LoggingSuite
17 home *coretesting.FakeHome18 home *coretesting.FakeHome
18}19}
1920
2021
=== modified file 'environs/instances/image_test.go'
--- environs/instances/image_test.go 2013-09-13 14:48:13 +0000
+++ environs/instances/image_test.go 2013-09-20 02:56:01 +0000
@@ -11,11 +11,11 @@
11 "launchpad.net/juju-core/constraints"11 "launchpad.net/juju-core/constraints"
12 "launchpad.net/juju-core/environs/imagemetadata"12 "launchpad.net/juju-core/environs/imagemetadata"
13 "launchpad.net/juju-core/environs/simplestreams"13 "launchpad.net/juju-core/environs/simplestreams"
14 coretesting "launchpad.net/juju-core/testing"14 "launchpad.net/juju-core/testing/testbase"
15)15)
1616
17type imageSuite struct {17type imageSuite struct {
18 coretesting.LoggingSuite18 testbase.LoggingSuite
19}19}
2020
21func Test(t *testing.T) {21func Test(t *testing.T) {
@@ -24,14 +24,6 @@
2424
25var _ = gc.Suite(&imageSuite{})25var _ = gc.Suite(&imageSuite{})
2626
27func (s *imageSuite) SetUpSuite(c *gc.C) {
28 s.LoggingSuite.SetUpSuite(c)
29}
30
31func (s *imageSuite) TearDownSuite(c *gc.C) {
32 s.LoggingSuite.TearDownTest(c)
33}
34
35var jsonImagesContent = `27var jsonImagesContent = `
36{28{
37 "content_id": "com.ubuntu.cloud:released:aws",29 "content_id": "com.ubuntu.cloud:released:aws",
3830
=== modified file 'environs/instances/instancetype_test.go'
--- environs/instances/instancetype_test.go 2013-08-14 17:33:09 +0000
+++ environs/instances/instancetype_test.go 2013-09-20 02:56:01 +0000
@@ -9,23 +9,15 @@
9 gc "launchpad.net/gocheck"9 gc "launchpad.net/gocheck"
1010
11 "launchpad.net/juju-core/constraints"11 "launchpad.net/juju-core/constraints"
12 "launchpad.net/juju-core/testing"12 "launchpad.net/juju-core/testing/testbase"
13)13)
1414
15type instanceTypeSuite struct {15type instanceTypeSuite struct {
16 testing.LoggingSuite16 testbase.LoggingSuite
17}17}
1818
19var _ = gc.Suite(&instanceTypeSuite{})19var _ = gc.Suite(&instanceTypeSuite{})
2020
21func (s *instanceTypeSuite) SetUpSuite(c *gc.C) {
22 s.LoggingSuite.SetUpSuite(c)
23}
24
25func (s *instanceTypeSuite) TearDownSuite(c *gc.C) {
26 s.LoggingSuite.TearDownTest(c)
27}
28
29var hvm = "hvm"21var hvm = "hvm"
3022
31// The instance types below do not necessarily reflect reality and are just23// The instance types below do not necessarily reflect reality and are just
3224
=== modified file 'environs/jujutest/livetests.go'
--- environs/jujutest/livetests.go 2013-09-18 22:54:32 +0000
+++ environs/jujutest/livetests.go 2013-09-20 02:56:01 +0000
@@ -33,6 +33,7 @@
33 statetesting "launchpad.net/juju-core/state/testing"33 statetesting "launchpad.net/juju-core/state/testing"
34 coretesting "launchpad.net/juju-core/testing"34 coretesting "launchpad.net/juju-core/testing"
35 jc "launchpad.net/juju-core/testing/checkers"35 jc "launchpad.net/juju-core/testing/checkers"
36 "launchpad.net/juju-core/testing/testbase"
36 coretools "launchpad.net/juju-core/tools"37 coretools "launchpad.net/juju-core/tools"
37 "launchpad.net/juju-core/utils"38 "launchpad.net/juju-core/utils"
38 "launchpad.net/juju-core/version"39 "launchpad.net/juju-core/version"
@@ -42,7 +43,7 @@
42// (e.g. Amazon EC2). The Environ is opened once only for all the tests43// (e.g. Amazon EC2). The Environ is opened once only for all the tests
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.
44type LiveTests struct {45type LiveTests struct {
45 coretesting.LoggingSuite46 testbase.LoggingSuite
46 envtesting.ToolsFixture47 envtesting.ToolsFixture
4748
48 // TestConfig contains the configuration attributes for opening an environment.49 // TestConfig contains the configuration attributes for opening an environment.
4950
=== modified file 'environs/jujutest/tests.go'
--- environs/jujutest/tests.go 2013-09-18 22:54:32 +0000
+++ environs/jujutest/tests.go 2013-09-20 02:56:01 +0000
@@ -22,6 +22,7 @@
22 "launchpad.net/juju-core/juju/testing"22 "launchpad.net/juju-core/juju/testing"
23 coretesting "launchpad.net/juju-core/testing"23 coretesting "launchpad.net/juju-core/testing"
24 jc "launchpad.net/juju-core/testing/checkers"24 jc "launchpad.net/juju-core/testing/checkers"
25 "launchpad.net/juju-core/testing/testbase"
25 "launchpad.net/juju-core/utils"26 "launchpad.net/juju-core/utils"
26 "launchpad.net/juju-core/version"27 "launchpad.net/juju-core/version"
27)28)
@@ -32,7 +33,7 @@
32// is opened once for each test, and some potentially expensive operations33// is opened once for each test, and some potentially expensive operations
33// may be executed.34// may be executed.
34type Tests struct {35type Tests struct {
35 coretesting.LoggingSuite36 testbase.LoggingSuite
36 TestConfig coretesting.Attrs37 TestConfig coretesting.Attrs
37 envtesting.ToolsFixture38 envtesting.ToolsFixture
38 Env environs.Environ39 Env environs.Environ
3940
=== modified file 'environs/manual/detection_test.go'
--- environs/manual/detection_test.go 2013-09-11 01:58:11 +0000
+++ environs/manual/detection_test.go 2013-09-20 02:56:01 +0000
@@ -12,12 +12,12 @@
1212
13 gc "launchpad.net/gocheck"13 gc "launchpad.net/gocheck"
1414
15 "launchpad.net/juju-core/testing"
16 jc "launchpad.net/juju-core/testing/checkers"15 jc "launchpad.net/juju-core/testing/checkers"
16 "launchpad.net/juju-core/testing/testbase"
17)17)
1818
19type detectionSuite struct {19type detectionSuite struct {
20 testing.LoggingSuite20 testbase.LoggingSuite
21}21}
2222
23var _ = gc.Suite(&detectionSuite{})23var _ = gc.Suite(&detectionSuite{})
@@ -71,7 +71,7 @@
71 c.Assert(err, gc.IsNil)71 c.Assert(err, gc.IsNil)
72 err = ioutil.WriteFile(sshexpectedinput, []byte(input), 0644)72 err = ioutil.WriteFile(sshexpectedinput, []byte(input), 0644)
73 c.Assert(err, gc.IsNil)73 c.Assert(err, gc.IsNil)
74 return testing.PatchEnvironment("PATH", fakebin+":"+os.Getenv("PATH"))74 return testbase.PatchEnvironment("PATH", fakebin+":"+os.Getenv("PATH"))
75}75}
7676
77func (s *detectionSuite) TestDetectSeries(c *gc.C) {77func (s *detectionSuite) TestDetectSeries(c *gc.C) {
7878
=== modified file 'environs/mongo_test.go'
--- environs/mongo_test.go 2013-08-21 18:38:22 +0000
+++ environs/mongo_test.go 2013-09-20 02:56:01 +0000
@@ -9,12 +9,13 @@
9 "launchpad.net/juju-core/environs"9 "launchpad.net/juju-core/environs"
10 "launchpad.net/juju-core/provider/dummy"10 "launchpad.net/juju-core/provider/dummy"
11 "launchpad.net/juju-core/testing"11 "launchpad.net/juju-core/testing"
12 "launchpad.net/juju-core/testing/testbase"
12 "launchpad.net/juju-core/version"13 "launchpad.net/juju-core/version"
13)14)
1415
15type MongoToolsSuite struct {16type MongoToolsSuite struct {
16 env environs.Environ17 env environs.Environ
17 testing.LoggingSuite18 testbase.LoggingSuite
18 dataDir string19 dataDir string
19}20}
2021
2122
=== modified file 'environs/simplestreams/testing/testing.go'
--- environs/simplestreams/testing/testing.go 2013-09-09 03:45:08 +0000
+++ environs/simplestreams/testing/testing.go 2013-09-20 02:56:01 +0000
@@ -13,7 +13,7 @@
1313
14 "launchpad.net/juju-core/environs/jujutest"14 "launchpad.net/juju-core/environs/jujutest"
15 "launchpad.net/juju-core/environs/simplestreams"15 "launchpad.net/juju-core/environs/simplestreams"
16 "launchpad.net/juju-core/testing"16 "launchpad.net/juju-core/testing/testbase"
17)17)
1818
19var imageData = map[string]string{19var imageData = map[string]string{
@@ -392,7 +392,7 @@
392}392}
393393
394type LocalLiveSimplestreamsSuite struct {394type LocalLiveSimplestreamsSuite struct {
395 testing.LoggingSuite395 testbase.LoggingSuite
396 Source simplestreams.DataSource396 Source simplestreams.DataSource
397 RequireSigned bool397 RequireSigned bool
398 DataType string398 DataType string
399399
=== modified file 'environs/sshstorage/storage_test.go'
--- environs/sshstorage/storage_test.go 2013-09-20 01:34:00 +0000
+++ environs/sshstorage/storage_test.go 2013-09-20 02:56:01 +0000
@@ -20,13 +20,13 @@
2020
21 "launchpad.net/juju-core/environs/storage"21 "launchpad.net/juju-core/environs/storage"
22 coreerrors "launchpad.net/juju-core/errors"22 coreerrors "launchpad.net/juju-core/errors"
23 "launchpad.net/juju-core/testing"
24 jc "launchpad.net/juju-core/testing/checkers"23 jc "launchpad.net/juju-core/testing/checkers"
24 "launchpad.net/juju-core/testing/testbase"
25 "launchpad.net/juju-core/utils"25 "launchpad.net/juju-core/utils"
26)26)
2727
28type storageSuite struct {28type storageSuite struct {
29 testing.LoggingSuite29 testbase.LoggingSuite
30 restoreEnv func()30 restoreEnv func()
31}31}
3232
@@ -42,8 +42,8 @@
42 cmd := exec.Command("bash", "-c", command)42 cmd := exec.Command("bash", "-c", command)
43 uid := fmt.Sprint(os.Getuid())43 uid := fmt.Sprint(os.Getuid())
44 gid := fmt.Sprint(os.Getgid())44 gid := fmt.Sprint(os.Getgid())
45 defer testing.PatchEnvironment("SUDO_UID", uid)()45 defer testbase.PatchEnvironment("SUDO_UID", uid)()
46 defer testing.PatchEnvironment("SUDO_GID", gid)()46 defer testbase.PatchEnvironment("SUDO_GID", gid)()
47 cmd.Env = os.Environ()47 cmd.Env = os.Environ()
48 return cmd48 return cmd
49}49}
@@ -59,7 +59,7 @@
59 c.Assert(err, gc.IsNil)59 c.Assert(err, gc.IsNil)
6060
61 bin := c.MkDir()61 bin := c.MkDir()
62 s.restoreEnv = testing.PatchEnvironment("PATH", bin+":"+os.Getenv("PATH"))62 s.restoreEnv = testbase.PatchEnvironment("PATH", bin+":"+os.Getenv("PATH"))
6363
64 // Create a "sudo" command which just executes its args.64 // Create a "sudo" command which just executes its args.
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)
6666
=== modified file 'environs/sync/sync_test.go'
--- environs/sync/sync_test.go 2013-09-20 00:33:38 +0000
+++ environs/sync/sync_test.go 2013-09-20 02:56:01 +0000
@@ -25,6 +25,7 @@
25 envtools "launchpad.net/juju-core/environs/tools"25 envtools "launchpad.net/juju-core/environs/tools"
26 "launchpad.net/juju-core/provider/dummy"26 "launchpad.net/juju-core/provider/dummy"
27 coretesting "launchpad.net/juju-core/testing"27 coretesting "launchpad.net/juju-core/testing"
28 "launchpad.net/juju-core/testing/testbase"
28 coretools "launchpad.net/juju-core/tools"29 coretools "launchpad.net/juju-core/tools"
29 "launchpad.net/juju-core/version"30 "launchpad.net/juju-core/version"
30)31)
@@ -34,7 +35,7 @@
34}35}
3536
36type syncSuite struct {37type syncSuite struct {
37 coretesting.LoggingSuite38 testbase.LoggingSuite
38 envtesting.ToolsFixture39 envtesting.ToolsFixture
39 home *coretesting.FakeHome40 home *coretesting.FakeHome
40 targetEnv environs.Environ41 targetEnv environs.Environ
@@ -241,7 +242,7 @@
241242
242type uploadSuite struct {243type uploadSuite struct {
243 env environs.Environ244 env environs.Environ
244 coretesting.LoggingSuite245 testbase.LoggingSuite
245 envtesting.ToolsFixture246 envtesting.ToolsFixture
246}247}
247248
248249
=== modified file 'environs/tools/build_test.go'
--- environs/tools/build_test.go 2013-08-21 01:31:34 +0000
+++ environs/tools/build_test.go 2013-09-20 02:56:01 +0000
@@ -12,11 +12,11 @@
12 gc "launchpad.net/gocheck"12 gc "launchpad.net/gocheck"
1313
14 "launchpad.net/juju-core/environs/tools"14 "launchpad.net/juju-core/environs/tools"
15 "launchpad.net/juju-core/testing"15 "launchpad.net/juju-core/testing/testbase"
16)16)
1717
18type buildSuite struct {18type buildSuite struct {
19 testing.LoggingSuite19 testbase.LoggingSuite
20 restore func()20 restore func()
21 cwd string21 cwd string
22 filePath string22 filePath string
2323
=== modified file 'environs/tools/storage_test.go'
--- environs/tools/storage_test.go 2013-09-17 05:29:35 +0000
+++ environs/tools/storage_test.go 2013-09-20 02:56:01 +0000
@@ -11,14 +11,14 @@
11 envtesting "launchpad.net/juju-core/environs/testing"11 envtesting "launchpad.net/juju-core/environs/testing"
12 envtools "launchpad.net/juju-core/environs/tools"12 envtools "launchpad.net/juju-core/environs/tools"
13 "launchpad.net/juju-core/provider/dummy"13 "launchpad.net/juju-core/provider/dummy"
14 "launchpad.net/juju-core/testing"14 "launchpad.net/juju-core/testing/testbase"
15 coretools "launchpad.net/juju-core/tools"15 coretools "launchpad.net/juju-core/tools"
16 "launchpad.net/juju-core/version"16 "launchpad.net/juju-core/version"
17)17)
1818
19type StorageSuite struct {19type StorageSuite struct {
20 env environs.Environ20 env environs.Environ
21 testing.LoggingSuite21 testbase.LoggingSuite
22 dataDir string22 dataDir string
23}23}
2424
2525
=== modified file 'environs/tools/tools_test.go'
--- environs/tools/tools_test.go 2013-09-20 00:33:38 +0000
+++ environs/tools/tools_test.go 2013-09-20 02:56:01 +0000
@@ -22,8 +22,8 @@
22 envtools "launchpad.net/juju-core/environs/tools"22 envtools "launchpad.net/juju-core/environs/tools"
23 "launchpad.net/juju-core/errors"23 "launchpad.net/juju-core/errors"
24 "launchpad.net/juju-core/provider/dummy"24 "launchpad.net/juju-core/provider/dummy"
25 "launchpad.net/juju-core/testing"
26 jc "launchpad.net/juju-core/testing/checkers"25 jc "launchpad.net/juju-core/testing/checkers"
26 "launchpad.net/juju-core/testing/testbase"
27 coretools "launchpad.net/juju-core/tools"27 coretools "launchpad.net/juju-core/tools"
28 "launchpad.net/juju-core/version"28 "launchpad.net/juju-core/version"
29)29)
@@ -40,7 +40,7 @@
40type ToolsSuite struct {40type ToolsSuite struct {
41 toolsTestHelper41 toolsTestHelper
42 env environs.Environ42 env environs.Environ
43 testing.LoggingSuite43 testbase.LoggingSuite
44 envtesting.ToolsFixture44 envtesting.ToolsFixture
45 origCurrentVersion version.Binary45 origCurrentVersion version.Binary
46}46}
4747
=== modified file 'environs/tools/validation_test.go'
--- environs/tools/validation_test.go 2013-09-12 00:17:20 +0000
+++ environs/tools/validation_test.go 2013-09-20 02:56:01 +0000
@@ -9,10 +9,11 @@
9 "launchpad.net/juju-core/environs/config"9 "launchpad.net/juju-core/environs/config"
10 "launchpad.net/juju-core/environs/simplestreams"10 "launchpad.net/juju-core/environs/simplestreams"
11 coretesting "launchpad.net/juju-core/testing"11 coretesting "launchpad.net/juju-core/testing"
12 "launchpad.net/juju-core/testing/testbase"
12)13)
1314
14type ValidateSuite struct {15type ValidateSuite struct {
15 coretesting.LoggingSuite16 testbase.LoggingSuite
16 home *coretesting.FakeHome17 home *coretesting.FakeHome
17}18}
1819
1920
=== modified file 'instance/address_test.go'
--- instance/address_test.go 2013-09-19 03:23:04 +0000
+++ instance/address_test.go 2013-09-20 02:56:01 +0000
@@ -9,11 +9,11 @@
99
10 gc "launchpad.net/gocheck"10 gc "launchpad.net/gocheck"
1111
12 "launchpad.net/juju-core/testing"12 "launchpad.net/juju-core/testing/testbase"
13)13)
1414
15type AddressSuite struct {15type AddressSuite struct {
16 testing.LoggingSuite16 testbase.LoggingSuite
17}17}
1818
19var _ = gc.Suite(&AddressSuite{})19var _ = gc.Suite(&AddressSuite{})
2020
=== modified file 'juju/apiconn_test.go'
--- juju/apiconn_test.go 2013-09-19 17:06:44 +0000
+++ juju/apiconn_test.go 2013-09-20 02:56:01 +0000
@@ -20,10 +20,11 @@
20 "launchpad.net/juju-core/state/api"20 "launchpad.net/juju-core/state/api"
21 coretesting "launchpad.net/juju-core/testing"21 coretesting "launchpad.net/juju-core/testing"
22 jc "launchpad.net/juju-core/testing/checkers"22 jc "launchpad.net/juju-core/testing/checkers"
23 "launchpad.net/juju-core/testing/testbase"
23)24)
2425
25type NewAPIConnSuite struct {26type NewAPIConnSuite struct {
26 coretesting.LoggingSuite27 testbase.LoggingSuite
27 envtesting.ToolsFixture28 envtesting.ToolsFixture
28}29}
2930
@@ -58,7 +59,7 @@
58}59}
5960
60type NewAPIClientSuite struct {61type NewAPIClientSuite struct {
61 coretesting.LoggingSuite62 testbase.LoggingSuite
62}63}
6364
64var _ = gc.Suite(&NewAPIClientSuite{})65var _ = gc.Suite(&NewAPIClientSuite{})
@@ -75,7 +76,7 @@
75 // Make sure of that by providing a suitably long delay76 // Make sure of that by providing a suitably long delay
76 // and checking that the connection happens within that77 // and checking that the connection happens within that
77 // time.78 // time.
78 defer coretesting.PatchValue(juju.ProviderConnectDelay, coretesting.LongWait).Restore()79 defer testbase.PatchValue(juju.ProviderConnectDelay, coretesting.LongWait).Restore()
79 bootstrapEnv(c, coretesting.SampleEnvName)80 bootstrapEnv(c, coretesting.SampleEnvName)
8081
81 startTime := time.Now()82 startTime := time.Now()
@@ -125,7 +126,7 @@
125 called++126 called++
126 return expectState, nil127 return expectState, nil
127 }128 }
128 defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore()129 defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore()
129 st, err := juju.NewAPIFromName("noconfig", store)130 st, err := juju.NewAPIFromName("noconfig", store)
130 c.Assert(err, gc.IsNil)131 c.Assert(err, gc.IsNil)
131 c.Assert(st, gc.Equals, expectState)132 c.Assert(st, gc.Equals, expectState)
@@ -138,7 +139,7 @@
138 store := newConfigStore("noconfig", &environInfo{139 store := newConfigStore("noconfig", &environInfo{
139 err: expectErr,140 err: expectErr,
140 })141 })
141 defer coretesting.PatchValue(juju.APIOpen, panicAPIOpen).Restore()142 defer testbase.PatchValue(juju.APIOpen, panicAPIOpen).Restore()
142 client, err := juju.NewAPIFromName("noconfig", store)143 client, err := juju.NewAPIFromName("noconfig", store)
143 c.Assert(err, gc.Equals, expectErr)144 c.Assert(err, gc.Equals, expectErr)
144 c.Assert(client, gc.IsNil)145 c.Assert(client, gc.IsNil)
@@ -157,7 +158,7 @@
157 store := newConfigStore("noconfig", &environInfo{158 store := newConfigStore("noconfig", &environInfo{
158 endpoint: endpoint,159 endpoint: endpoint,
159 })160 })
160 defer coretesting.PatchValue(juju.APIOpen, panicAPIOpen).Restore()161 defer testbase.PatchValue(juju.APIOpen, panicAPIOpen).Restore()
161162
162 st, err := juju.NewAPIFromName("noconfig", store)163 st, err := juju.NewAPIFromName("noconfig", store)
163 c.Assert(err, gc.ErrorMatches, `environment "noconfig" not found`)164 c.Assert(err, gc.ErrorMatches, `environment "noconfig" not found`)
@@ -177,7 +178,7 @@
177 apiOpen := func(apiInfo *api.Info, opts api.DialOpts) (*api.State, error) {178 apiOpen := func(apiInfo *api.Info, opts api.DialOpts) (*api.State, error) {
178 return nil, expectErr179 return nil, expectErr
179 }180 }
180 defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore()181 defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore()
181 st, err := juju.NewAPIFromName("noconfig", store)182 st, err := juju.NewAPIFromName("noconfig", store)
182 c.Assert(err, gc.Equals, expectErr)183 c.Assert(err, gc.Equals, expectErr)
183 c.Assert(st, gc.IsNil)184 c.Assert(st, gc.IsNil)
@@ -199,7 +200,7 @@
199 // On a sample run with no delay, the logic took 45ms to run, so200 // On a sample run with no delay, the logic took 45ms to run, so
200 // we make the delay slightly more than that, so that if the201 // we make the delay slightly more than that, so that if the
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.
202 defer coretesting.PatchValue(juju.ProviderConnectDelay, 50*time.Millisecond).Restore()203 defer testbase.PatchValue(juju.ProviderConnectDelay, 50*time.Millisecond).Restore()
203 apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) {204 apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) {
204 if info.Addrs[0] == "infoapi.com" {205 if info.Addrs[0] == "infoapi.com" {
205 infoEndpointOpened <- struct{}{}206 infoEndpointOpened <- struct{}{}
@@ -207,7 +208,7 @@
207 }208 }
208 return cfgOpenedState, nil209 return cfgOpenedState, nil
209 }210 }
210 defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore()211 defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore()
211212
212 stateClosed, restoreAPIClose := setAPIClosed()213 stateClosed, restoreAPIClose := setAPIClosed()
213 defer restoreAPIClose.Restore()214 defer restoreAPIClose.Restore()
@@ -250,7 +251,7 @@
250 cfgOpenedState := new(api.State)251 cfgOpenedState := new(api.State)
251 cfgEndpointOpened := make(chan struct{})252 cfgEndpointOpened := make(chan struct{})
252253
253 defer coretesting.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore()254 defer testbase.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore()
254 apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) {255 apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) {
255 if info.Addrs[0] == "infoapi.com" {256 if info.Addrs[0] == "infoapi.com" {
256 infoEndpointOpened <- struct{}{}257 infoEndpointOpened <- struct{}{}
@@ -261,7 +262,7 @@
261 <-cfgEndpointOpened262 <-cfgEndpointOpened
262 return cfgOpenedState, nil263 return cfgOpenedState, nil
263 }264 }
264 defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore()265 defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore()
265266
266 stateClosed, restoreAPIClose := setAPIClosed()267 stateClosed, restoreAPIClose := setAPIClosed()
267 defer restoreAPIClose.Restore()268 defer restoreAPIClose.Restore()
@@ -315,14 +316,14 @@
315 endpoint: endpoint,316 endpoint: endpoint,
316 })317 })
317318
318 defer coretesting.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore()319 defer testbase.PatchValue(juju.ProviderConnectDelay, 0*time.Second).Restore()
319 apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) {320 apiOpen := func(info *api.Info, opts api.DialOpts) (*api.State, error) {
320 if info.Addrs[0] == "infoapi.com" {321 if info.Addrs[0] == "infoapi.com" {
321 return nil, fmt.Errorf("info connect failed")322 return nil, fmt.Errorf("info connect failed")
322 }323 }
323 return nil, fmt.Errorf("config connect failed")324 return nil, fmt.Errorf("config connect failed")
324 }325 }
325 defer coretesting.PatchValue(juju.APIOpen, apiOpen).Restore()326 defer testbase.PatchValue(juju.APIOpen, apiOpen).Restore()
326 st, err := juju.NewAPIFromName(coretesting.SampleEnvName, store)327 st, err := juju.NewAPIFromName(coretesting.SampleEnvName, store)
327 c.Check(err, gc.ErrorMatches, "config connect failed")328 c.Check(err, gc.ErrorMatches, "config connect failed")
328 c.Check(st, gc.IsNil)329 c.Check(st, gc.IsNil)
@@ -344,13 +345,13 @@
344 c.Assert(envInfo.Name, gc.Equals, expectName)345 c.Assert(envInfo.Name, gc.Equals, expectName)
345}346}
346347
347func setAPIClosed() (<-chan *api.State, coretesting.Restorer) {348func setAPIClosed() (<-chan *api.State, testbase.Restorer) {
348 stateClosed := make(chan *api.State)349 stateClosed := make(chan *api.State)
349 apiClose := func(st *api.State) error {350 apiClose := func(st *api.State) error {
350 stateClosed <- st351 stateClosed <- st
351 return nil352 return nil
352 }353 }
353 return stateClosed, coretesting.PatchValue(juju.APIClose, apiClose)354 return stateClosed, testbase.PatchValue(juju.APIClose, apiClose)
354}355}
355356
356func newConfigStore(envName string, info *environInfo) environs.ConfigStorage {357func newConfigStore(envName string, info *environInfo) environs.ConfigStorage {
357358
=== modified file 'juju/conn_test.go'
--- juju/conn_test.go 2013-09-13 14:48:13 +0000
+++ juju/conn_test.go 2013-09-20 02:56:01 +0000
@@ -27,6 +27,7 @@
27 "launchpad.net/juju-core/state"27 "launchpad.net/juju-core/state"
28 coretesting "launchpad.net/juju-core/testing"28 coretesting "launchpad.net/juju-core/testing"
29 jc "launchpad.net/juju-core/testing/checkers"29 jc "launchpad.net/juju-core/testing/checkers"
30 "launchpad.net/juju-core/testing/testbase"
30 "launchpad.net/juju-core/utils"31 "launchpad.net/juju-core/utils"
31 "launchpad.net/juju-core/utils/set"32 "launchpad.net/juju-core/utils/set"
32)33)
@@ -36,7 +37,7 @@
36}37}
3738
38type NewConnSuite struct {39type NewConnSuite struct {
39 coretesting.LoggingSuite40 testbase.LoggingSuite
40 envtesting.ToolsFixture41 envtesting.ToolsFixture
41}42}
4243
@@ -222,7 +223,7 @@
222}223}
223224
224type ConnSuite struct {225type ConnSuite struct {
225 coretesting.LoggingSuite226 testbase.LoggingSuite
226 coretesting.MgoSuite227 coretesting.MgoSuite
227 envtesting.ToolsFixture228 envtesting.ToolsFixture
228 conn *juju.Conn229 conn *juju.Conn
229230
=== modified file 'juju/osenv/package_test.go'
--- juju/osenv/package_test.go 2013-08-28 20:37:53 +0000
+++ juju/osenv/package_test.go 2013-09-20 02:56:01 +0000
@@ -8,7 +8,7 @@
88
9 gc "launchpad.net/gocheck"9 gc "launchpad.net/gocheck"
1010
11 coretesting "launchpad.net/juju-core/testing"11 "launchpad.net/juju-core/testing/testbase"
12)12)
1313
14func Test(t *testing.T) {14func Test(t *testing.T) {
@@ -21,6 +21,6 @@
2121
22func (*importSuite) TestDependencies(c *gc.C) {22func (*importSuite) TestDependencies(c *gc.C) {
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.
24 c.Assert(coretesting.FindJujuCoreImports(c, "launchpad.net/juju-core/juju/osenv"),24 c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/juju/osenv"),
25 gc.HasLen, 0)25 gc.HasLen, 0)
26}26}
2727
=== modified file 'juju/osenv/vars_linux_test.go'
--- juju/osenv/vars_linux_test.go 2013-09-04 14:27:52 +0000
+++ juju/osenv/vars_linux_test.go 2013-09-20 02:56:01 +0000
@@ -4,11 +4,11 @@
4 gc "launchpad.net/gocheck"4 gc "launchpad.net/gocheck"
55
6 "launchpad.net/juju-core/juju/osenv"6 "launchpad.net/juju-core/juju/osenv"
7 "launchpad.net/juju-core/testing"7 "launchpad.net/juju-core/testing/testbase"
8)8)
99
10func (*importSuite) TestHomeLinux(c *gc.C) {10func (*importSuite) TestHomeLinux(c *gc.C) {
11 h := "/home/foo/bar"11 h := "/home/foo/bar"
12 testing.PatchEnvironment("HOME", h)12 testbase.PatchEnvironment("HOME", h)
13 c.Check(osenv.Home(), gc.Equals, h)13 c.Check(osenv.Home(), gc.Equals, h)
14}14}
1515
=== modified file 'juju/osenv/vars_windows_test.go'
--- juju/osenv/vars_windows_test.go 2013-09-04 14:27:52 +0000
+++ juju/osenv/vars_windows_test.go 2013-09-20 02:56:01 +0000
@@ -10,8 +10,8 @@
10)10)
1111
12func (*importSuite) TestHome(c *gc.C) {12func (*importSuite) TestHome(c *gc.C) {
13 testing.PatchEnvironment("HOMEPATH", "")13 testbase.PatchEnvironment("HOMEPATH", "")
14 testing.PatchEnvironment("HOMEDRIVE", "")14 testbase.PatchEnvironment("HOMEDRIVE", "")
1515
16 drive := "P:"16 drive := "P:"
17 path := `\home\foo\bar`17 path := `\home\foo\bar`
1818
=== modified file 'juju/testing/conn.go'
--- juju/testing/conn.go 2013-09-17 04:06:28 +0000
+++ juju/testing/conn.go 2013-09-20 02:56:01 +0000
@@ -28,11 +28,12 @@
28 "launchpad.net/juju-core/state"28 "launchpad.net/juju-core/state"
29 "launchpad.net/juju-core/state/api"29 "launchpad.net/juju-core/state/api"
30 "launchpad.net/juju-core/testing"30 "launchpad.net/juju-core/testing"
31 "launchpad.net/juju-core/testing/testbase"
31 "launchpad.net/juju-core/version"32 "launchpad.net/juju-core/version"
32)33)
3334
34// JujuConnSuite provides a freshly bootstrapped juju.Conn35// JujuConnSuite provides a freshly bootstrapped juju.Conn
35// for each test. It also includes testing.LoggingSuite.36// for each test. It also includes testbase.LoggingSuite.
36//37//
37// It also sets up RootDir to point to a directory hierarchy38// It also sets up RootDir to point to a directory hierarchy
38// mirroring the intended juju directory structure, including39// mirroring the intended juju directory structure, including
@@ -50,7 +51,7 @@
50 // /var/lib/juju: the use cases are completely non-overlapping, and any tests that51 // /var/lib/juju: the use cases are completely non-overlapping, and any tests that
51 // really do need both to exist ought to be embedding distinct fixtures for the52 // really do need both to exist ought to be embedding distinct fixtures for the
52 // distinct environments.53 // distinct environments.
53 testing.LoggingSuite54 testbase.LoggingSuite
54 testing.MgoSuite55 testing.MgoSuite
55 envtesting.ToolsFixture56 envtesting.ToolsFixture
56 Conn *juju.Conn57 Conn *juju.Conn
5758
=== modified file 'provider/azure/azure_test.go'
--- provider/azure/azure_test.go 2013-09-10 02:17:23 +0000
+++ provider/azure/azure_test.go 2013-09-20 02:56:01 +0000
@@ -9,7 +9,7 @@
9 gc "launchpad.net/gocheck"9 gc "launchpad.net/gocheck"
1010
11 envtesting "launchpad.net/juju-core/environs/testing"11 envtesting "launchpad.net/juju-core/environs/testing"
12 "launchpad.net/juju-core/testing"12 "launchpad.net/juju-core/testing/testbase"
13)13)
1414
15func TestAzureProvider(t *stdtesting.T) {15func TestAzureProvider(t *stdtesting.T) {
@@ -17,7 +17,7 @@
17}17}
1818
19type providerSuite struct {19type providerSuite struct {
20 testing.LoggingSuite20 testbase.LoggingSuite
21 envtesting.ToolsFixture21 envtesting.ToolsFixture
22 restoreTimeouts func()22 restoreTimeouts func()
23}23}
2424
=== modified file 'provider/azure/config_test.go'
--- provider/azure/config_test.go 2013-09-12 12:38:04 +0000
+++ provider/azure/config_test.go 2013-09-20 02:56:01 +0000
@@ -11,10 +11,11 @@
1111
12 "launchpad.net/juju-core/environs/config"12 "launchpad.net/juju-core/environs/config"
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing"
14 "launchpad.net/juju-core/testing/testbase"
14)15)
1516
16type configSuite struct {17type configSuite struct {
17 testing.LoggingSuite18 testbase.LoggingSuite
18}19}
1920
20var _ = gc.Suite(&configSuite{})21var _ = gc.Suite(&configSuite{})
2122
=== modified file 'provider/azure/customdata_test.go'
--- provider/azure/customdata_test.go 2013-08-22 23:39:47 +0000
+++ provider/azure/customdata_test.go 2013-09-20 02:56:01 +0000
@@ -14,11 +14,12 @@
14 "launchpad.net/juju-core/state"14 "launchpad.net/juju-core/state"
15 "launchpad.net/juju-core/state/api"15 "launchpad.net/juju-core/state/api"
16 "launchpad.net/juju-core/testing"16 "launchpad.net/juju-core/testing"
17 "launchpad.net/juju-core/testing/testbase"
17 "launchpad.net/juju-core/tools"18 "launchpad.net/juju-core/tools"
18)19)
1920
20type customDataSuite struct {21type customDataSuite struct {
21 testing.LoggingSuite22 testbase.LoggingSuite
22}23}
2324
24var _ = gc.Suite(&customDataSuite{})25var _ = gc.Suite(&customDataSuite{})
2526
=== modified file 'provider/ec2/config_test.go'
--- provider/ec2/config_test.go 2013-09-18 07:13:09 +0000
+++ provider/ec2/config_test.go 2013-09-20 02:56:01 +0000
@@ -18,12 +18,13 @@
18 "launchpad.net/juju-core/environs/config"18 "launchpad.net/juju-core/environs/config"
19 "launchpad.net/juju-core/juju/osenv"19 "launchpad.net/juju-core/juju/osenv"
20 "launchpad.net/juju-core/testing"20 "launchpad.net/juju-core/testing"
21 "launchpad.net/juju-core/testing/testbase"
21)22)
2223
23// Use local suite since this file lives in the ec2 package24// Use local suite since this file lives in the ec2 package
24// for testing internals.25// for testing internals.
25type ConfigSuite struct {26type ConfigSuite struct {
26 testing.LoggingSuite27 testbase.LoggingSuite
27 savedHome, savedAccessKey, savedSecretKey string28 savedHome, savedAccessKey, savedSecretKey string
28}29}
2930
3031
=== modified file 'provider/ec2/image_test.go'
--- provider/ec2/image_test.go 2013-09-18 22:54:32 +0000
+++ provider/ec2/image_test.go 2013-09-20 02:56:01 +0000
@@ -10,11 +10,11 @@
10 "launchpad.net/juju-core/environs/imagemetadata"10 "launchpad.net/juju-core/environs/imagemetadata"
11 "launchpad.net/juju-core/environs/instances"11 "launchpad.net/juju-core/environs/instances"
12 "launchpad.net/juju-core/environs/simplestreams"12 "launchpad.net/juju-core/environs/simplestreams"
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing/testbase"
14)14)
1515
16type imageSuite struct {16type imageSuite struct {
17 testing.LoggingSuite17 testbase.LoggingSuite
18}18}
1919
20var _ = gc.Suite(&imageSuite{})20var _ = gc.Suite(&imageSuite{})
@@ -30,7 +30,7 @@
30}30}
3131
32type specSuite struct {32type specSuite struct {
33 testing.LoggingSuite33 testbase.LoggingSuite
34}34}
3535
36var _ = gc.Suite(&specSuite{})36var _ = gc.Suite(&specSuite{})
3737
=== modified file 'provider/ec2/live_test.go'
--- provider/ec2/live_test.go 2013-09-18 22:54:32 +0000
+++ provider/ec2/live_test.go 2013-09-20 02:56:01 +0000
@@ -26,6 +26,7 @@
26 "launchpad.net/juju-core/provider/ec2"26 "launchpad.net/juju-core/provider/ec2"
27 coretesting "launchpad.net/juju-core/testing"27 coretesting "launchpad.net/juju-core/testing"
28 jc "launchpad.net/juju-core/testing/checkers"28 jc "launchpad.net/juju-core/testing/checkers"
29 "launchpad.net/juju-core/testing/testbase"
29 "launchpad.net/juju-core/version"30 "launchpad.net/juju-core/version"
30)31)
3132
@@ -72,7 +73,7 @@
72// LiveTests contains tests that can be run against the Amazon servers.73// LiveTests contains tests that can be run against the Amazon servers.
73// Each test runs using the same ec2 connection.74// Each test runs using the same ec2 connection.
74type LiveTests struct {75type LiveTests struct {
75 coretesting.LoggingSuite76 testbase.LoggingSuite
76 jujutest.LiveTests77 jujutest.LiveTests
77 writablePublicStorage storage.Storage78 writablePublicStorage storage.Storage
78}79}
7980
=== modified file 'provider/ec2/local_test.go'
--- provider/ec2/local_test.go 2013-09-17 05:09:55 +0000
+++ provider/ec2/local_test.go 2013-09-20 02:56:01 +0000
@@ -30,6 +30,7 @@
30 "launchpad.net/juju-core/provider/ec2"30 "launchpad.net/juju-core/provider/ec2"
31 "launchpad.net/juju-core/testing"31 "launchpad.net/juju-core/testing"
32 jc "launchpad.net/juju-core/testing/checkers"32 jc "launchpad.net/juju-core/testing/checkers"
33 "launchpad.net/juju-core/testing/testbase"
33 "launchpad.net/juju-core/utils"34 "launchpad.net/juju-core/utils"
34)35)
3536
@@ -372,7 +373,7 @@
372// localNonUSEastSuite is similar to localServerSuite but the S3 mock server373// localNonUSEastSuite is similar to localServerSuite but the S3 mock server
373// behaves as if it is not in the us-east region.374// behaves as if it is not in the us-east region.
374type localNonUSEastSuite struct {375type localNonUSEastSuite struct {
375 testing.LoggingSuite376 testbase.LoggingSuite
376 restoreEC2Patching func()377 restoreEC2Patching func()
377 srv localServer378 srv localServer
378 env environs.Environ379 env environs.Environ
379380
=== modified file 'provider/local/environprovider_test.go'
--- provider/local/environprovider_test.go 2013-08-20 18:50:48 +0000
+++ provider/local/environprovider_test.go 2013-09-20 02:56:01 +0000
@@ -10,10 +10,11 @@
10 "launchpad.net/juju-core/container/lxc"10 "launchpad.net/juju-core/container/lxc"
11 "launchpad.net/juju-core/provider/local"11 "launchpad.net/juju-core/provider/local"
12 "launchpad.net/juju-core/testing"12 "launchpad.net/juju-core/testing"
13 "launchpad.net/juju-core/testing/testbase"
13)14)
1415
15type baseProviderSuite struct {16type baseProviderSuite struct {
16 testing.LoggingSuite17 testbase.LoggingSuite
17 lxc.TestSuite18 lxc.TestSuite
18 home *testing.FakeHome19 home *testing.FakeHome
19 restore func()20 restore func()
2021
=== modified file 'provider/local/local_test.go'
--- provider/local/local_test.go 2013-08-27 18:33:36 +0000
+++ provider/local/local_test.go 2013-09-20 02:56:01 +0000
@@ -11,7 +11,7 @@
11 "launchpad.net/juju-core/environs"11 "launchpad.net/juju-core/environs"
12 "launchpad.net/juju-core/provider"12 "launchpad.net/juju-core/provider"
13 "launchpad.net/juju-core/provider/local"13 "launchpad.net/juju-core/provider/local"
14 "launchpad.net/juju-core/testing"14 "launchpad.net/juju-core/testing/testbase"
15)15)
1616
17func TestLocal(t *stdtesting.T) {17func TestLocal(t *stdtesting.T) {
@@ -19,7 +19,7 @@
19}19}
2020
21type localSuite struct {21type localSuite struct {
22 testing.LoggingSuite22 testbase.LoggingSuite
23}23}
2424
25var _ = gc.Suite(&localSuite{})25var _ = gc.Suite(&localSuite{})
2626
=== modified file 'provider/local/prereqs_test.go'
--- provider/local/prereqs_test.go 2013-08-09 06:42:05 +0000
+++ provider/local/prereqs_test.go 2013-09-20 02:56:01 +0000
@@ -10,11 +10,11 @@
1010
11 gc "launchpad.net/gocheck"11 gc "launchpad.net/gocheck"
1212
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing/testbase"
14)14)
1515
16type prereqsSuite struct {16type prereqsSuite struct {
17 testing.LoggingSuite17 testbase.LoggingSuite
18 tmpdir string18 tmpdir string
19 oldpath string19 oldpath string
20}20}
2121
=== modified file 'provider/maas/config_test.go'
--- provider/maas/config_test.go 2013-09-12 12:38:04 +0000
+++ provider/maas/config_test.go 2013-09-20 02:56:01 +0000
@@ -8,10 +8,11 @@
88
9 "launchpad.net/juju-core/environs"9 "launchpad.net/juju-core/environs"
10 "launchpad.net/juju-core/testing"10 "launchpad.net/juju-core/testing"
11 "launchpad.net/juju-core/testing/testbase"
11)12)
1213
13type configSuite struct {14type configSuite struct {
14 testing.LoggingSuite15 testbase.LoggingSuite
15}16}
1617
17var _ = gc.Suite(&configSuite{})18var _ = gc.Suite(&configSuite{})
1819
=== modified file 'provider/maas/maas_test.go'
--- provider/maas/maas_test.go 2013-09-06 01:48:40 +0000
+++ provider/maas/maas_test.go 2013-09-20 02:56:01 +0000
@@ -10,7 +10,7 @@
10 "launchpad.net/gomaasapi"10 "launchpad.net/gomaasapi"
1111
12 envtesting "launchpad.net/juju-core/environs/testing"12 envtesting "launchpad.net/juju-core/environs/testing"
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing/testbase"
14)14)
1515
16func TestMAAS(t *stdtesting.T) {16func TestMAAS(t *stdtesting.T) {
@@ -18,7 +18,7 @@
18}18}
1919
20type providerSuite struct {20type providerSuite struct {
21 testing.LoggingSuite21 testbase.LoggingSuite
22 envtesting.ToolsFixture22 envtesting.ToolsFixture
23 environ *maasEnviron23 environ *maasEnviron
24 testMAASObject *gomaasapi.TestMAASObject24 testMAASObject *gomaasapi.TestMAASObject
2525
=== modified file 'provider/openstack/config_test.go'
--- provider/openstack/config_test.go 2013-09-16 16:40:23 +0000
+++ provider/openstack/config_test.go 2013-09-20 02:56:01 +0000
@@ -15,10 +15,11 @@
15 "launchpad.net/juju-core/environs"15 "launchpad.net/juju-core/environs"
16 "launchpad.net/juju-core/environs/config"16 "launchpad.net/juju-core/environs/config"
17 "launchpad.net/juju-core/testing"17 "launchpad.net/juju-core/testing"
18 "launchpad.net/juju-core/testing/testbase"
18)19)
1920
20type ConfigSuite struct {21type ConfigSuite struct {
21 testing.LoggingSuite22 testbase.LoggingSuite
22 savedVars map[string]string23 savedVars map[string]string
23 oldJujuHome *testing.FakeHome24 oldJujuHome *testing.FakeHome
24}25}
2526
=== modified file 'provider/openstack/live_test.go'
--- provider/openstack/live_test.go 2013-09-18 07:13:09 +0000
+++ provider/openstack/live_test.go 2013-09-20 02:56:01 +0000
@@ -18,6 +18,7 @@
18 envtesting "launchpad.net/juju-core/environs/testing"18 envtesting "launchpad.net/juju-core/environs/testing"
19 "launchpad.net/juju-core/provider/openstack"19 "launchpad.net/juju-core/provider/openstack"
20 coretesting "launchpad.net/juju-core/testing"20 coretesting "launchpad.net/juju-core/testing"
21 "launchpad.net/juju-core/testing/testbase"
21)22)
2223
23// generate a different bucket name for each config instance, so that24// generate a different bucket name for each config instance, so that
@@ -72,7 +73,7 @@
72// The deployment can be a real live instance or service doubles.73// The deployment can be a real live instance or service doubles.
73// Each test runs using the same connection.74// Each test runs using the same connection.
74type LiveTests struct {75type LiveTests struct {
75 coretesting.LoggingSuite76 testbase.LoggingSuite
76 jujutest.LiveTests77 jujutest.LiveTests
77 cred *identity.Credentials78 cred *identity.Credentials
78 writeablePublicStorage storage.Storage79 writeablePublicStorage storage.Storage
7980
=== modified file 'provider/openstack/local_test.go'
--- provider/openstack/local_test.go 2013-09-18 22:54:32 +0000
+++ provider/openstack/local_test.go 2013-09-20 02:56:01 +0000
@@ -33,6 +33,7 @@
33 "launchpad.net/juju-core/provider/openstack"33 "launchpad.net/juju-core/provider/openstack"
34 coretesting "launchpad.net/juju-core/testing"34 coretesting "launchpad.net/juju-core/testing"
35 jc "launchpad.net/juju-core/testing/checkers"35 jc "launchpad.net/juju-core/testing/checkers"
36 "launchpad.net/juju-core/testing/testbase"
36 "launchpad.net/juju-core/version"37 "launchpad.net/juju-core/version"
37)38)
3839
@@ -149,7 +150,7 @@
149150
150// localLiveSuite runs tests from LiveTests using an Openstack service double.151// localLiveSuite runs tests from LiveTests using an Openstack service double.
151type localLiveSuite struct {152type localLiveSuite struct {
152 coretesting.LoggingSuite153 testbase.LoggingSuite
153 LiveTests154 LiveTests
154 srv localServer155 srv localServer
155}156}
@@ -184,7 +185,7 @@
184// to test on a live Openstack server. The service double is started and stopped for185// to test on a live Openstack server. The service double is started and stopped for
185// each test.186// each test.
186type localServerSuite struct {187type localServerSuite struct {
187 coretesting.LoggingSuite188 testbase.LoggingSuite
188 jujutest.Tests189 jujutest.Tests
189 cred *identity.Credentials190 cred *identity.Credentials
190 srv localServer191 srv localServer
191192
=== modified file 'provider/state_test.go'
--- provider/state_test.go 2013-09-19 00:22:15 +0000
+++ provider/state_test.go 2013-09-20 02:56:01 +0000
@@ -18,10 +18,11 @@
18 "launchpad.net/juju-core/provider"18 "launchpad.net/juju-core/provider"
19 "launchpad.net/juju-core/testing"19 "launchpad.net/juju-core/testing"
20 jc "launchpad.net/juju-core/testing/checkers"20 jc "launchpad.net/juju-core/testing/checkers"
21 "launchpad.net/juju-core/testing/testbase"
21)22)
2223
23type StateSuite struct {24type StateSuite struct {
24 testing.LoggingSuite25 testbase.LoggingSuite
25}26}
2627
27var _ = gc.Suite(&StateSuite{})28var _ = gc.Suite(&StateSuite{})
2829
=== modified file 'rpc/jsoncodec/codec_test.go'
--- rpc/jsoncodec/codec_test.go 2013-09-13 14:48:13 +0000
+++ rpc/jsoncodec/codec_test.go 2013-09-20 02:56:01 +0000
@@ -12,11 +12,11 @@
1212
13 "launchpad.net/juju-core/rpc"13 "launchpad.net/juju-core/rpc"
14 "launchpad.net/juju-core/rpc/jsoncodec"14 "launchpad.net/juju-core/rpc/jsoncodec"
15 "launchpad.net/juju-core/testing"15 "launchpad.net/juju-core/testing/testbase"
16)16)
1717
18type suite struct {18type suite struct {
19 testing.LoggingSuite19 testbase.LoggingSuite
20}20}
2121
22var _ = gc.Suite(&suite{})22var _ = gc.Suite(&suite{})
2323
=== modified file 'rpc/rpc_test.go'
--- rpc/rpc_test.go 2013-09-13 06:42:24 +0000
+++ rpc/rpc_test.go 2013-09-20 02:56:01 +0000
@@ -17,11 +17,11 @@
17 "launchpad.net/juju-core/log"17 "launchpad.net/juju-core/log"
18 "launchpad.net/juju-core/rpc"18 "launchpad.net/juju-core/rpc"
19 "launchpad.net/juju-core/rpc/jsoncodec"19 "launchpad.net/juju-core/rpc/jsoncodec"
20 "launchpad.net/juju-core/testing"20 "launchpad.net/juju-core/testing/testbase"
21)21)
2222
23type suite struct {23type suite struct {
24 testing.LoggingSuite24 testbase.LoggingSuite
25}25}
2626
27var _ = gc.Suite(&suite{})27var _ = gc.Suite(&suite{})
2828
=== modified file 'state/apiserver/common/errors_test.go'
--- state/apiserver/common/errors_test.go 2013-09-18 15:02:31 +0000
+++ state/apiserver/common/errors_test.go 2013-09-20 02:56:01 +0000
@@ -12,12 +12,12 @@
12 "launchpad.net/juju-core/state"12 "launchpad.net/juju-core/state"
13 "launchpad.net/juju-core/state/api/params"13 "launchpad.net/juju-core/state/api/params"
14 "launchpad.net/juju-core/state/apiserver/common"14 "launchpad.net/juju-core/state/apiserver/common"
15 "launchpad.net/juju-core/testing"
16 jc "launchpad.net/juju-core/testing/checkers"15 jc "launchpad.net/juju-core/testing/checkers"
16 "launchpad.net/juju-core/testing/testbase"
17)17)
1818
19type errorsSuite struct {19type errorsSuite struct {
20 testing.LoggingSuite20 testbase.LoggingSuite
21}21}
2222
23var _ = gc.Suite(&errorsSuite{})23var _ = gc.Suite(&errorsSuite{})
2424
=== modified file 'state/conn_test.go'
--- state/conn_test.go 2013-08-19 11:20:02 +0000
+++ state/conn_test.go 2013-09-20 02:56:01 +0000
@@ -11,6 +11,7 @@
1111
12 "launchpad.net/juju-core/state"12 "launchpad.net/juju-core/state"
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing"
14 "launchpad.net/juju-core/testing/testbase"
14)15)
1516
16// TestPackage integrates the tests into gotest.17// TestPackage integrates the tests into gotest.
@@ -22,7 +23,7 @@
22// test suites (StateSuite, CharmSuite, MachineSuite, etc).23// test suites (StateSuite, CharmSuite, MachineSuite, etc).
23type ConnSuite struct {24type ConnSuite struct {
24 testing.MgoSuite25 testing.MgoSuite
25 testing.LoggingSuite26 testbase.LoggingSuite
26 annotations *mgo.Collection27 annotations *mgo.Collection
27 charms *mgo.Collection28 charms *mgo.Collection
28 machines *mgo.Collection29 machines *mgo.Collection
2930
=== modified file 'state/initialize_test.go'
--- state/initialize_test.go 2013-09-13 14:48:13 +0000
+++ state/initialize_test.go 2013-09-20 02:56:01 +0000
@@ -12,11 +12,12 @@
12 "launchpad.net/juju-core/state"12 "launchpad.net/juju-core/state"
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing"
14 jc "launchpad.net/juju-core/testing/checkers"14 jc "launchpad.net/juju-core/testing/checkers"
15 "launchpad.net/juju-core/testing/testbase"
15)16)
1617
17type InitializeSuite struct {18type InitializeSuite struct {
18 testing.MgoSuite19 testing.MgoSuite
19 testing.LoggingSuite20 testbase.LoggingSuite
20 State *state.State21 State *state.State
21}22}
2223
2324
=== modified file 'state/megawatcher_internal_test.go'
--- state/megawatcher_internal_test.go 2013-09-13 10:58:13 +0000
+++ state/megawatcher_internal_test.go 2013-09-20 02:56:01 +0000
@@ -20,6 +20,7 @@
20 "launchpad.net/juju-core/state/multiwatcher"20 "launchpad.net/juju-core/state/multiwatcher"
21 "launchpad.net/juju-core/state/watcher"21 "launchpad.net/juju-core/state/watcher"
22 "launchpad.net/juju-core/testing"22 "launchpad.net/juju-core/testing"
23 "launchpad.net/juju-core/testing/testbase"
23)24)
2425
25var dottedConfig = `26var dottedConfig = `
@@ -28,7 +29,7 @@
28`29`
2930
30type storeManagerStateSuite struct {31type storeManagerStateSuite struct {
31 testing.LoggingSuite32 testbase.LoggingSuite
32 testing.MgoSuite33 testing.MgoSuite
33 State *State34 State *State
34}35}
3536
=== modified file 'state/multiwatcher/multiwatcher_internal_test.go'
--- state/multiwatcher/multiwatcher_internal_test.go 2013-09-13 14:48:13 +0000
+++ state/multiwatcher/multiwatcher_internal_test.go 2013-09-20 02:56:01 +0000
@@ -16,7 +16,7 @@
1616
17 "launchpad.net/juju-core/state/api/params"17 "launchpad.net/juju-core/state/api/params"
18 "launchpad.net/juju-core/state/watcher"18 "launchpad.net/juju-core/state/watcher"
19 "launchpad.net/juju-core/testing"19 "launchpad.net/juju-core/testing/testbase"
20)20)
2121
22func Test(t *stdtesting.T) {22func Test(t *stdtesting.T) {
@@ -24,7 +24,7 @@
24}24}
2525
26type storeSuite struct {26type storeSuite struct {
27 testing.LoggingSuite27 testbase.LoggingSuite
28}28}
2929
30var _ = gc.Suite(&storeSuite{})30var _ = gc.Suite(&storeSuite{})
@@ -270,7 +270,7 @@
270}270}
271271
272type storeManagerSuite struct {272type storeManagerSuite struct {
273 testing.LoggingSuite273 testbase.LoggingSuite
274}274}
275275
276var _ = gc.Suite(&storeManagerSuite{})276var _ = gc.Suite(&storeManagerSuite{})
277277
=== modified file 'state/presence/presence_test.go'
--- state/presence/presence_test.go 2013-09-13 14:48:13 +0000
+++ state/presence/presence_test.go 2013-09-20 02:56:01 +0000
@@ -14,6 +14,7 @@
1414
15 "launchpad.net/juju-core/state/presence"15 "launchpad.net/juju-core/state/presence"
16 "launchpad.net/juju-core/testing"16 "launchpad.net/juju-core/testing"
17 "launchpad.net/juju-core/testing/testbase"
17)18)
1819
19func TestPackage(t *stdtesting.T) {20func TestPackage(t *stdtesting.T) {
@@ -22,7 +23,7 @@
2223
23type PresenceSuite struct {24type PresenceSuite struct {
24 testing.MgoSuite25 testing.MgoSuite
25 testing.LoggingSuite26 testbase.LoggingSuite
26 presence *mgo.Collection27 presence *mgo.Collection
27 pings *mgo.Collection28 pings *mgo.Collection
28}29}
2930
=== modified file 'state/settings_test.go'
--- state/settings_test.go 2013-09-13 14:48:13 +0000
+++ state/settings_test.go 2013-09-20 02:56:01 +0000
@@ -12,10 +12,11 @@
12 "launchpad.net/juju-core/errors"12 "launchpad.net/juju-core/errors"
13 "launchpad.net/juju-core/testing"13 "launchpad.net/juju-core/testing"
14 jc "launchpad.net/juju-core/testing/checkers"14 jc "launchpad.net/juju-core/testing/checkers"
15 "launchpad.net/juju-core/testing/testbase"
15)16)
1617
17type SettingsSuite struct {18type SettingsSuite struct {
18 testing.LoggingSuite19 testbase.LoggingSuite
19 testing.MgoSuite20 testing.MgoSuite
20 state *State21 state *State
21 key string22 key string
2223
=== modified file 'state/watcher/watcher_test.go'
--- state/watcher/watcher_test.go 2013-09-13 14:48:13 +0000
+++ state/watcher/watcher_test.go 2013-09-20 02:56:01 +0000
@@ -14,6 +14,7 @@
1414
15 "launchpad.net/juju-core/state/watcher"15 "launchpad.net/juju-core/state/watcher"
16 "launchpad.net/juju-core/testing"16 "launchpad.net/juju-core/testing"
17 "launchpad.net/juju-core/testing/testbase"
17)18)
1819
19// Test tuning parameters.20// Test tuning parameters.
@@ -46,7 +47,7 @@
4647
47type watcherSuite struct {48type watcherSuite struct {
48 testing.MgoSuite49 testing.MgoSuite
49 testing.LoggingSuite50 testbase.LoggingSuite
5051
51 log *mgo.Collection52 log *mgo.Collection
52 stash *mgo.Collection53 stash *mgo.Collection
5354
=== modified file 'store/store_test.go'
--- store/store_test.go 2013-08-19 11:20:02 +0000
+++ store/store_test.go 2013-09-20 02:56:01 +0000
@@ -18,6 +18,7 @@
18 "launchpad.net/juju-core/charm"18 "launchpad.net/juju-core/charm"
19 "launchpad.net/juju-core/store"19 "launchpad.net/juju-core/store"
20 "launchpad.net/juju-core/testing"20 "launchpad.net/juju-core/testing"
21 "launchpad.net/juju-core/testing/testbase"
21)22)
2223
23func Test(t *stdtesting.T) {24func Test(t *stdtesting.T) {
@@ -30,7 +31,7 @@
30type StoreSuite struct {31type StoreSuite struct {
31 MgoSuite32 MgoSuite
32 testing.HTTPSuite33 testing.HTTPSuite
33 testing.LoggingSuite34 testbase.LoggingSuite
34 store *store.Store35 store *store.Store
35}36}
3637
3738
=== modified file 'testing/mgo_test.go'
--- testing/mgo_test.go 2013-08-19 11:20:02 +0000
+++ testing/mgo_test.go 2013-09-20 02:56:01 +0000
@@ -10,10 +10,11 @@
10 gc "launchpad.net/gocheck"10 gc "launchpad.net/gocheck"
1111
12 "launchpad.net/juju-core/testing"12 "launchpad.net/juju-core/testing"
13 "launchpad.net/juju-core/testing/testbase"
13)14)
1415
15type mgoSuite struct {16type mgoSuite struct {
16 testing.LoggingSuite17 testbase.LoggingSuite
17 testing.MgoSuite18 testing.MgoSuite
18}19}
1920
2021
=== added directory 'testing/testbase'
=== renamed file 'testing/cleanup.go' => 'testing/testbase/cleanup.go'
--- testing/cleanup.go 2013-09-19 02:41:40 +0000
+++ testing/testbase/cleanup.go 2013-09-20 02:56:01 +0000
@@ -1,7 +1,7 @@
1// Copyright 2013 Canonical Ltd.1// Copyright 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.2// Licensed under the AGPLv3, see LICENCE file for details.
33
4package testing4package testbase
55
6import (6import (
7 gc "launchpad.net/gocheck"7 gc "launchpad.net/gocheck"
88
=== renamed file 'testing/cleanup_test.go' => 'testing/testbase/cleanup_test.go'
--- testing/cleanup_test.go 2013-09-19 11:37:54 +0000
+++ testing/testbase/cleanup_test.go 2013-09-20 02:56:01 +0000
@@ -1,15 +1,18 @@
1package testing_test1// Copyright 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.
3
4package testbase_test
25
3import (6import (
4 "os"7 "os"
58
6 gc "launchpad.net/gocheck"9 gc "launchpad.net/gocheck"
710
8 "launchpad.net/juju-core/testing"11 "launchpad.net/juju-core/testing/testbase"
9)12)
1013
11type cleanupSuite struct {14type cleanupSuite struct {
12 testing.CleanupSuite15 testbase.CleanupSuite
13}16}
1417
15var _ = gc.Suite(&cleanupSuite{})18var _ = gc.Suite(&cleanupSuite{})
1619
=== renamed file 'testing/imports.go' => 'testing/testbase/imports.go'
--- testing/imports.go 2013-07-23 21:11:51 +0000
+++ testing/testbase/imports.go 2013-09-20 02:56:01 +0000
@@ -1,7 +1,7 @@
1// Copyright 2013 Canonical Ltd.1// Copyright 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.2// Licensed under the AGPLv3, see LICENCE file for details.
33
4package testing4package testbase
55
6import (6import (
7 "go/build"7 "go/build"
88
=== renamed file 'testing/log.go' => 'testing/testbase/log.go'
--- testing/log.go 2013-09-17 02:46:26 +0000
+++ testing/testbase/log.go 2013-09-20 02:56:01 +0000
@@ -1,7 +1,7 @@
1// Copyright 2012, 2013 Canonical Ltd.1// Copyright 2012, 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.2// Licensed under the AGPLv3, see LICENCE file for details.
33
4package testing4package testbase
55
6import (6import (
7 "fmt"7 "fmt"
88
=== renamed file 'testing/log_test.go' => 'testing/testbase/log_test.go'
--- testing/log_test.go 2013-09-13 14:48:13 +0000
+++ testing/testbase/log_test.go 2013-09-20 02:56:01 +0000
@@ -1,16 +1,19 @@
1package testing_test1// Copyright 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.
3
4package testbase_test
25
3import (6import (
4 gc "launchpad.net/gocheck"7 gc "launchpad.net/gocheck"
58
6 "launchpad.net/juju-core/log"9 "launchpad.net/juju-core/log"
7 "launchpad.net/juju-core/testing"10 "launchpad.net/juju-core/testing/testbase"
8)11)
912
10var _ = gc.Suite(&logSuite{})13var _ = gc.Suite(&logSuite{})
1114
12type logSuite struct {15type logSuite struct {
13 testing.LoggingSuite16 testbase.LoggingSuite
14}17}
1518
16func (s *logSuite) SetUpSuite(c *gc.C) {19func (s *logSuite) SetUpSuite(c *gc.C) {
1720
=== added file 'testing/testbase/package_test.go'
--- testing/testbase/package_test.go 1970-01-01 00:00:00 +0000
+++ testing/testbase/package_test.go 2013-09-20 02:56:01 +0000
@@ -0,0 +1,26 @@
1// Copyright 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.
3
4package testbase_test
5
6import (
7 "testing"
8
9 gc "launchpad.net/gocheck"
10
11 "launchpad.net/juju-core/testing/testbase"
12)
13
14func Test(t *testing.T) {
15 gc.TestingT(t)
16}
17
18type DependencySuite struct{}
19
20var _ = gc.Suite(&DependencySuite{})
21
22func (*DependencySuite) TestPackageDependencies(c *gc.C) {
23 // This test is to ensure we don't bring in any juju-core dependencies.
24 c.Assert(testbase.FindJujuCoreImports(c, "launchpad.net/juju-core/testing/testbase"),
25 gc.HasLen, 0)
26}
027
=== renamed file 'testing/patch.go' => 'testing/testbase/patch.go'
--- testing/patch.go 2013-09-19 02:41:40 +0000
+++ testing/testbase/patch.go 2013-09-20 02:56:01 +0000
@@ -1,4 +1,7 @@
1package testing1// Copyright 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.
3
4package testbase
25
3import (6import (
4 "os"7 "os"
58
=== renamed file 'testing/patch_test.go' => 'testing/testbase/patch_test.go'
--- testing/patch_test.go 2013-09-19 02:41:40 +0000
+++ testing/testbase/patch_test.go 2013-09-20 02:56:01 +0000
@@ -1,4 +1,7 @@
1package testing_test1// Copyright 2013 Canonical Ltd.
2// Licensed under the AGPLv3, see LICENCE file for details.
3
4package testbase_test
25
3import (6import (
4 "errors"7 "errors"
@@ -6,7 +9,7 @@
69
7 gc "launchpad.net/gocheck"10 gc "launchpad.net/gocheck"
811
9 "launchpad.net/juju-core/testing"12 "launchpad.net/juju-core/testing/testbase"
10)13)
1114
12type PatchValueSuite struct{}15type PatchValueSuite struct{}
@@ -15,7 +18,7 @@
1518
16func (*PatchValueSuite) TestSetInt(c *gc.C) {19func (*PatchValueSuite) TestSetInt(c *gc.C) {
17 i := 9920 i := 99
18 restore := testing.PatchValue(&i, 88)21 restore := testbase.PatchValue(&i, 88)
19 c.Assert(i, gc.Equals, 88)22 c.Assert(i, gc.Equals, 88)
20 restore()23 restore()
21 c.Assert(i, gc.Equals, 99)24 c.Assert(i, gc.Equals, 99)
@@ -25,7 +28,7 @@
25 oldErr := errors.New("foo")28 oldErr := errors.New("foo")
26 newErr := errors.New("bar")29 newErr := errors.New("bar")
27 err := oldErr30 err := oldErr
28 restore := testing.PatchValue(&err, newErr)31 restore := testbase.PatchValue(&err, newErr)
29 c.Assert(err, gc.Equals, newErr)32 c.Assert(err, gc.Equals, newErr)
30 restore()33 restore()
31 c.Assert(err, gc.Equals, oldErr)34 c.Assert(err, gc.Equals, oldErr)
@@ -34,7 +37,7 @@
34func (*PatchValueSuite) TestSetErrorToNil(c *gc.C) {37func (*PatchValueSuite) TestSetErrorToNil(c *gc.C) {
35 oldErr := errors.New("foo")38 oldErr := errors.New("foo")
36 err := oldErr39 err := oldErr
37 restore := testing.PatchValue(&err, nil)40 restore := testbase.PatchValue(&err, nil)
38 c.Assert(err, gc.Equals, nil)41 c.Assert(err, gc.Equals, nil)
39 restore()42 restore()
40 c.Assert(err, gc.Equals, oldErr)43 c.Assert(err, gc.Equals, oldErr)
@@ -43,7 +46,7 @@
43func (*PatchValueSuite) TestSetMapToNil(c *gc.C) {46func (*PatchValueSuite) TestSetMapToNil(c *gc.C) {
44 oldMap := map[string]int{"foo": 1234}47 oldMap := map[string]int{"foo": 1234}
45 m := oldMap48 m := oldMap
46 restore := testing.PatchValue(&m, nil)49 restore := testbase.PatchValue(&m, nil)
47 c.Assert(m, gc.IsNil)50 c.Assert(m, gc.IsNil)
48 restore()51 restore()
49 c.Assert(m, gc.DeepEquals, oldMap)52 c.Assert(m, gc.DeepEquals, oldMap)
@@ -52,7 +55,7 @@
52func (*PatchValueSuite) TestSetPanicsWhenNotAssignable(c *gc.C) {55func (*PatchValueSuite) TestSetPanicsWhenNotAssignable(c *gc.C) {
53 i := 9956 i := 99
54 type otherInt int57 type otherInt int
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`)
56}59}
5760
58type PatchEnvironmentSuite struct{}61type PatchEnvironmentSuite struct{}
@@ -64,7 +67,7 @@
64 // remember the old value, and set it to something we can check67 // remember the old value, and set it to something we can check
65 oldValue := os.Getenv(envName)68 oldValue := os.Getenv(envName)
66 os.Setenv(envName, "initial")69 os.Setenv(envName, "initial")
67 restore := testing.PatchEnvironment(envName, "new value")70 restore := testbase.PatchEnvironment(envName, "new value")
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.
69 c.Check(os.Getenv(envName), gc.Equals, "new value")72 c.Check(os.Getenv(envName), gc.Equals, "new value")
70 restore()73 restore()
7174
=== modified file 'utils/fslock/fslock_test.go'
--- utils/fslock/fslock_test.go 2013-09-13 14:48:13 +0000
+++ utils/fslock/fslock_test.go 2013-09-20 02:56:01 +0000
@@ -17,6 +17,7 @@
17 "launchpad.net/tomb"17 "launchpad.net/tomb"
1818
19 coretesting "launchpad.net/juju-core/testing"19 coretesting "launchpad.net/juju-core/testing"
20 "launchpad.net/juju-core/testing/testbase"
20 "launchpad.net/juju-core/utils/fslock"21 "launchpad.net/juju-core/utils/fslock"
21)22)
2223
@@ -25,7 +26,7 @@
25}26}
2627
27type fslockSuite struct {28type fslockSuite struct {
28 coretesting.LoggingSuite29 testbase.LoggingSuite
29 lockDelay time.Duration30 lockDelay time.Duration
30}31}
3132
3233
=== modified file 'worker/deployer/simple_test.go'
--- worker/deployer/simple_test.go 2013-09-13 14:48:13 +0000
+++ worker/deployer/simple_test.go 2013-09-20 02:56:01 +0000
@@ -19,6 +19,7 @@
19 "launchpad.net/juju-core/names"19 "launchpad.net/juju-core/names"
20 "launchpad.net/juju-core/testing"20 "launchpad.net/juju-core/testing"
21 jc "launchpad.net/juju-core/testing/checkers"21 jc "launchpad.net/juju-core/testing/checkers"
22 "launchpad.net/juju-core/testing/testbase"
22 "launchpad.net/juju-core/version"23 "launchpad.net/juju-core/version"
23 "launchpad.net/juju-core/worker/deployer"24 "launchpad.net/juju-core/worker/deployer"
24)25)
@@ -129,7 +130,7 @@
129}130}
130131
131type SimpleToolsFixture struct {132type SimpleToolsFixture struct {
132 testing.LoggingSuite133 testbase.LoggingSuite
133 dataDir string134 dataDir string
134 initDir string135 initDir string
135 logDir string136 logDir string
136137
=== modified file 'worker/notifyworker_test.go'
--- worker/notifyworker_test.go 2013-08-28 14:03:08 +0000
+++ worker/notifyworker_test.go 2013-09-20 02:56:01 +0000
@@ -15,11 +15,12 @@
15 "launchpad.net/juju-core/state/watcher"15 "launchpad.net/juju-core/state/watcher"
16 coretesting "launchpad.net/juju-core/testing"16 coretesting "launchpad.net/juju-core/testing"
17 jc "launchpad.net/juju-core/testing/checkers"17 jc "launchpad.net/juju-core/testing/checkers"
18 "launchpad.net/juju-core/testing/testbase"
18 "launchpad.net/juju-core/worker"19 "launchpad.net/juju-core/worker"
19)20)
2021
21type notifyWorkerSuite struct {22type notifyWorkerSuite struct {
22 coretesting.LoggingSuite23 testbase.LoggingSuite
23 worker worker.Worker24 worker worker.Worker
24 actor *notifyHandler25 actor *notifyHandler
25}26}
2627
=== modified file 'worker/provisioner/lxc-broker_test.go'
--- worker/provisioner/lxc-broker_test.go 2013-09-19 03:23:04 +0000
+++ worker/provisioner/lxc-broker_test.go 2013-09-20 02:56:01 +0000
@@ -27,13 +27,14 @@
27 "launchpad.net/juju-core/state"27 "launchpad.net/juju-core/state"
28 coretesting "launchpad.net/juju-core/testing"28 coretesting "launchpad.net/juju-core/testing"
29 jc "launchpad.net/juju-core/testing/checkers"29 jc "launchpad.net/juju-core/testing/checkers"
30 "launchpad.net/juju-core/testing/testbase"
30 coretools "launchpad.net/juju-core/tools"31 coretools "launchpad.net/juju-core/tools"
31 "launchpad.net/juju-core/version"32 "launchpad.net/juju-core/version"
32 "launchpad.net/juju-core/worker/provisioner"33 "launchpad.net/juju-core/worker/provisioner"
33)34)
3435
35type lxcSuite struct {36type lxcSuite struct {
36 coretesting.LoggingSuite37 testbase.LoggingSuite
37 lxc.TestSuite38 lxc.TestSuite
38 events chan mock.Event39 events chan mock.Event
39}40}
4041
=== modified file 'worker/runner_test.go'
--- worker/runner_test.go 2013-08-19 11:20:02 +0000
+++ worker/runner_test.go 2013-09-20 02:56:01 +0000
@@ -12,12 +12,12 @@
12 gc "launchpad.net/gocheck"12 gc "launchpad.net/gocheck"
13 "launchpad.net/tomb"13 "launchpad.net/tomb"
1414
15 coretesting "launchpad.net/juju-core/testing"15 "launchpad.net/juju-core/testing/testbase"
16 "launchpad.net/juju-core/worker"16 "launchpad.net/juju-core/worker"
17)17)
1818
19type runnerSuite struct {19type runnerSuite struct {
20 coretesting.LoggingSuite20 testbase.LoggingSuite
21 restartDelay time.Duration21 restartDelay time.Duration
22}22}
2323
2424
=== modified file 'worker/stringsworker_test.go'
--- worker/stringsworker_test.go 2013-08-28 14:03:08 +0000
+++ worker/stringsworker_test.go 2013-09-20 02:56:01 +0000
@@ -15,11 +15,12 @@
15 "launchpad.net/juju-core/state/watcher"15 "launchpad.net/juju-core/state/watcher"
16 coretesting "launchpad.net/juju-core/testing"16 coretesting "launchpad.net/juju-core/testing"
17 jc "launchpad.net/juju-core/testing/checkers"17 jc "launchpad.net/juju-core/testing/checkers"
18 "launchpad.net/juju-core/testing/testbase"
18 "launchpad.net/juju-core/worker"19 "launchpad.net/juju-core/worker"
19)20)
2021
21type stringsWorkerSuite struct {22type stringsWorkerSuite struct {
22 coretesting.LoggingSuite23 testbase.LoggingSuite
23 worker worker.Worker24 worker worker.Worker
24 actor *stringsHandler25 actor *stringsHandler
25}26}
2627
=== modified file 'worker/uniter/charm/git_test.go'
--- worker/uniter/charm/git_test.go 2013-09-19 02:17:33 +0000
+++ worker/uniter/charm/git_test.go 2013-09-20 02:56:01 +0000
@@ -14,6 +14,7 @@
14 corecharm "launchpad.net/juju-core/charm"14 corecharm "launchpad.net/juju-core/charm"
15 "launchpad.net/juju-core/testing"15 "launchpad.net/juju-core/testing"
16 jc "launchpad.net/juju-core/testing/checkers"16 jc "launchpad.net/juju-core/testing/checkers"
17 "launchpad.net/juju-core/testing/testbase"
17 "launchpad.net/juju-core/worker/uniter/charm"18 "launchpad.net/juju-core/worker/uniter/charm"
18)19)
1920
@@ -21,7 +22,7 @@
2122
22type GitDirSuite struct {23type GitDirSuite struct {
23 testing.GitSuite24 testing.GitSuite
24 LoggingSuite testing.LoggingSuite25 LoggingSuite testbase.LoggingSuite
25}26}
2627
27var _ = gc.Suite(&GitDirSuite{})28var _ = gc.Suite(&GitDirSuite{})
2829
=== modified file 'worker/uniter/debug/server_test.go'
--- worker/uniter/debug/server_test.go 2013-09-19 03:23:04 +0000
+++ worker/uniter/debug/server_test.go 2013-09-20 02:56:01 +0000
@@ -14,12 +14,12 @@
1414
15 gc "launchpad.net/gocheck"15 gc "launchpad.net/gocheck"
1616
17 "launchpad.net/juju-core/testing"
18 jc "launchpad.net/juju-core/testing/checkers"17 jc "launchpad.net/juju-core/testing/checkers"
18 "launchpad.net/juju-core/testing/testbase"
19)19)
2020
21type DebugHooksServerSuite struct {21type DebugHooksServerSuite struct {
22 testing.LoggingSuite22 testbase.LoggingSuite
23 ctx *HooksContext23 ctx *HooksContext
24 fakebin string24 fakebin string
25 tmpdir string25 tmpdir string
2626
=== modified file 'worker/uniter/jujuc/server_test.go'
--- worker/uniter/jujuc/server_test.go 2013-09-13 14:48:13 +0000
+++ worker/uniter/jujuc/server_test.go 2013-09-20 02:56:01 +0000
@@ -19,6 +19,7 @@
19 "launchpad.net/juju-core/cmd"19 "launchpad.net/juju-core/cmd"
20 "launchpad.net/juju-core/testing"20 "launchpad.net/juju-core/testing"
21 jc "launchpad.net/juju-core/testing/checkers"21 jc "launchpad.net/juju-core/testing/checkers"
22 "launchpad.net/juju-core/testing/testbase"
22 "launchpad.net/juju-core/worker/uniter/jujuc"23 "launchpad.net/juju-core/worker/uniter/jujuc"
23)24)
2425
@@ -69,7 +70,7 @@
69}70}
7071
71type ServerSuite struct {72type ServerSuite struct {
72 testing.LoggingSuite73 testbase.LoggingSuite
73 server *jujuc.Server74 server *jujuc.Server
74 sockPath string75 sockPath string
75 err chan error76 err chan error

Subscribers

People subscribed via source and target branches

to status/vote changes: