Skip to content

Commit 2eace84

Browse files
author
Tim Penhey
committed
Some changes.
1 parent a61529f commit 2eace84

30 files changed

+40
-53
lines changed

agent/agent_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
gc "launchpad.net/gocheck"
88

99
"launchpad.net/juju-core/agent"
10-
coretesting "launchpad.net/juju-core/testing"
10+
"launchpad.net/juju-core/testing/testbase"
1111
)
1212

1313
type suite struct {
14-
coretesting.LoggingSuite
14+
testbase.LoggingSuite
1515
}
1616

1717
var _ = gc.Suite(&suite{})

agent/format-1.12_whitebox_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99

1010
gc "launchpad.net/gocheck"
1111

12-
"launchpad.net/juju-core/testing"
1312
jc "launchpad.net/juju-core/testing/checkers"
13+
"launchpad.net/juju-core/testing/testbase"
1414
)
1515

1616
type format_1_12Suite struct {
17-
testing.LoggingSuite
17+
testbase.LoggingSuite
1818
formatter formatter_1_12
1919
}
2020

agent/format-1.16_whitebox_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import (
1414
gc "launchpad.net/gocheck"
1515

1616
"launchpad.net/juju-core/juju/osenv"
17-
"launchpad.net/juju-core/testing"
1817
jc "launchpad.net/juju-core/testing/checkers"
18+
"launchpad.net/juju-core/testing/testbase"
1919
)
2020

2121
type format_1_16Suite struct {
22-
testing.LoggingSuite
22+
testbase.LoggingSuite
2323
formatter formatter_1_16
2424
}
2525

agent/format_whitebox_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99

1010
gc "launchpad.net/gocheck"
1111

12-
"launchpad.net/juju-core/testing"
12+
"launchpad.net/juju-core/testbase"
1313
)
1414

1515
type formatSuite struct {
16-
testing.LoggingSuite
16+
testbase.LoggingSuite
1717
}
1818

1919
var _ = gc.Suite(&formatSuite{})

agent/tools/diskmanager_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
agenttools "launchpad.net/juju-core/agent/tools"
1313
coretesting "launchpad.net/juju-core/testing"
14+
"launchpad.net/juju-core/testing/testbase"
1415
coretools "launchpad.net/juju-core/tools"
1516
"launchpad.net/juju-core/version"
1617
)
@@ -20,7 +21,7 @@ var _ = gc.Suite(&DiskManagerSuite{})
2021
var _ agenttools.ToolsManager = (*agenttools.DiskManager)(nil)
2122

2223
type DiskManagerSuite struct {
23-
coretesting.LoggingSuite
24+
testbase.LoggingSuite
2425
dataDir string
2526
manager agenttools.ToolsManager
2627
}

agent/tools/tools_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ import (
1414

1515
agenttools "launchpad.net/juju-core/agent/tools"
1616
"launchpad.net/juju-core/testing"
17+
"launchpad.net/juju-core/testing/testbase"
1718
coretest "launchpad.net/juju-core/tools"
1819
"launchpad.net/juju-core/version"
1920
)
2021

2122
type ToolsSuite struct {
22-
testing.LoggingSuite
23+
testbase.LoggingSuite
2324
dataDir string
2425
}
2526

@@ -35,7 +36,7 @@ func (t *ToolsSuite) TestPackageDependencies(c *gc.C) {
3536
// or any of the other bigger packages that'll drag in yet more dependencies.
3637
// Only imports that start with "launchpad.net/juju-core" are checked, and the
3738
// 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"),
3940
gc.DeepEquals,
4041
[]string{"tools", "version"})
4142
}

charm/dir_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
)
2121

2222
type DirSuite struct {
23-
testing.LoggingSuite
23+
testbase.LoggingSuite
2424
}
2525

2626
var _ = gc.Suite(&DirSuite{})

charm/repo_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (s *MockStore) ServeCharm(w http.ResponseWriter, r *http.Request) {
151151
}
152152

153153
type StoreSuite struct {
154-
testing.LoggingSuite
154+
testbase.LoggingSuite
155155
server *MockStore
156156
store *charm.CharmStore
157157
oldCacheDir string
@@ -392,7 +392,7 @@ func (s *StoreSuite) TestCharmURL(c *gc.C) {
392392
}
393393

394394
type LocalRepoSuite struct {
395-
testing.LoggingSuite
395+
testbase.LoggingSuite
396396
repo *charm.LocalRepository
397397
seriesPath string
398398
}

cmd/juju/bootstrap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
)
2929

3030
type BootstrapSuite struct {
31-
coretesting.LoggingSuite
31+
testbase.LoggingSuite
3232
coretesting.MgoSuite
3333
envtesting.ToolsFixture
3434
}

cmd/juju/plugin_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
type PluginSuite struct {
21-
testing.LoggingSuite
21+
testbase.LoggingSuite
2222
oldPath string
2323
home *testing.FakeHome
2424
}

cmd/juju/publish_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
// Sadly, this is a very slow test suite, heavily dominated by calls to bzr.
1919

2020
type PublishSuite struct {
21-
testing.LoggingSuite
21+
testbase.LoggingSuite
2222
testing.HTTPSuite
2323

2424
home *testing.FakeHome

cmd/juju/synctools_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
type syncToolsSuite struct {
21-
coretesting.LoggingSuite
21+
testbase.LoggingSuite
2222
home *coretesting.FakeHome
2323
targetEnv environs.Environ
2424
localStorage string

cmd/jujud/agent_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
var _ = gc.Suite(&toolSuite{})
3333

3434
type toolSuite struct {
35-
coretesting.LoggingSuite
35+
testbase.LoggingSuite
3636
}
3737

3838
var errorImportanceTests = []error{

cmd/jujud/bootstrap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
// We don't want to use JujuConnSuite because it gives us
2727
// an already-bootstrapped environment.
2828
type BootstrapSuite struct {
29-
testing.LoggingSuite
29+
testbase.LoggingSuite
3030
testing.MgoSuite
3131
dataDir string
3232
providerStateURLFile string

cmd/logging_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ import (
1313
"launchpad.net/juju-core/cmd"
1414
"launchpad.net/juju-core/juju/osenv"
1515
"launchpad.net/juju-core/testing"
16+
"launchpad.net/juju-core/testing/testbase"
1617
)
1718

1819
var logger = loggo.GetLogger("juju.test")
1920

2021
type LogSuite struct {
21-
testing.CleanupSuite
22+
testbase.CleanupSuite
2223
}
2324

2425
var _ = gc.Suite(&LogSuite{})

container/lxc/lxc_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func Test(t *stdtesting.T) {
3030
}
3131

3232
type LxcSuite struct {
33-
testing.LoggingSuite
33+
testbase.LoggingSuite
3434
lxc.TestSuite
3535
oldPath string
3636
}
@@ -217,7 +217,7 @@ func (s *LxcSuite) TestListContainers(c *gc.C) {
217217
}
218218

219219
type NetworkSuite struct {
220-
testing.LoggingSuite
220+
testbase.LoggingSuite
221221
}
222222

223223
var _ = gc.Suite(&NetworkSuite{})

environs/bootstrap/bootstrap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const (
3232

3333
type bootstrapSuite struct {
3434
home *coretesting.FakeHome
35-
coretesting.LoggingSuite
35+
testbase.LoggingSuite
3636
envtesting.ToolsFixture
3737
}
3838

environs/cert_internal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// EnvironsCertSuite tests the internal functions defined in environs/cert.go
1414
type EnvironsCertSuite struct {
15-
testing.LoggingSuite
15+
testbase.LoggingSuite
1616
}
1717

1818
var _ = gc.Suite(&EnvironsCertSuite{})

environs/cert_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
type EnvironsCertSuite struct {
17-
testing.LoggingSuite
17+
testbase.LoggingSuite
1818
}
1919

2020
var _ = gc.Suite(&EnvironsCertSuite{})

environs/cloudinit/cloudinit_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
// Use local suite since this file lives in the ec2 package
2828
// for testing internals.
2929
type cloudinitSuite struct {
30-
testing.LoggingSuite
30+
testbase.LoggingSuite
3131
}
3232

3333
var _ = gc.Suite(&cloudinitSuite{})

environs/cloudinit_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func dummySampleConfig() testing.Attrs {
3434
}
3535

3636
type CloudInitSuite struct {
37-
testing.LoggingSuite
37+
testbase.LoggingSuite
3838
}
3939

4040
var _ = gc.Suite(&CloudInitSuite{})

environs/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func Test(t *stdtesting.T) {
2525
}
2626

2727
type ConfigSuite struct {
28-
testing.LoggingSuite
28+
testbase.LoggingSuite
2929
home string
3030
}
3131

environs/httpstorage/backend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestLocal(t *stdtesting.T) {
2626
}
2727

2828
type backendSuite struct {
29-
testing.LoggingSuite
29+
testbase.LoggingSuite
3030
}
3131

3232
var _ = gc.Suite(&backendSuite{})

environs/imagemetadata/validation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
type ValidateSuite struct {
16-
coretesting.LoggingSuite
16+
testbase.LoggingSuite
1717
home *coretesting.FakeHome
1818
}
1919

environs/instances/image_test.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
type imageSuite struct {
18-
coretesting.LoggingSuite
18+
testbase.LoggingSuite
1919
}
2020

2121
func Test(t *testing.T) {
@@ -24,14 +24,6 @@ func Test(t *testing.T) {
2424

2525
var _ = gc.Suite(&imageSuite{})
2626

27-
func (s *imageSuite) SetUpSuite(c *gc.C) {
28-
s.LoggingSuite.SetUpSuite(c)
29-
}
30-
31-
func (s *imageSuite) TearDownSuite(c *gc.C) {
32-
s.LoggingSuite.TearDownTest(c)
33-
}
34-
3527
var jsonImagesContent = `
3628
{
3729
"content_id": "com.ubuntu.cloud:released:aws",

environs/instances/instancetype_test.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,11 @@ import (
1313
)
1414

1515
type instanceTypeSuite struct {
16-
testing.LoggingSuite
16+
testbase.LoggingSuite
1717
}
1818

1919
var _ = gc.Suite(&instanceTypeSuite{})
2020

21-
func (s *instanceTypeSuite) SetUpSuite(c *gc.C) {
22-
s.LoggingSuite.SetUpSuite(c)
23-
}
24-
25-
func (s *instanceTypeSuite) TearDownSuite(c *gc.C) {
26-
s.LoggingSuite.TearDownTest(c)
27-
}
28-
2921
var hvm = "hvm"
3022

3123
// The instance types below do not necessarily reflect reality and are just

environs/jujutest/livetests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
// (e.g. Amazon EC2). The Environ is opened once only for all the tests
4343
// in the suite, stored in Env, and Destroyed after the suite has completed.
4444
type LiveTests struct {
45-
coretesting.LoggingSuite
45+
testbase.LoggingSuite
4646
envtesting.ToolsFixture
4747

4848
// TestConfig contains the configuration attributes for opening an environment.

environs/jujutest/tests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
// is opened once for each test, and some potentially expensive operations
3333
// may be executed.
3434
type Tests struct {
35-
coretesting.LoggingSuite
35+
testbase.LoggingSuite
3636
TestConfig coretesting.Attrs
3737
envtesting.ToolsFixture
3838
Env environs.Environ

environs/manual/detection_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
)
1818

1919
type detectionSuite struct {
20-
testing.LoggingSuite
20+
testbase.LoggingSuite
2121
}
2222

2323
var _ = gc.Suite(&detectionSuite{})

environs/mongo_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
type MongoToolsSuite struct {
1616
env environs.Environ
17-
testing.LoggingSuite
17+
testbase.LoggingSuite
1818
dataDir string
1919
}
2020

0 commit comments

Comments
 (0)