Reviewers: mp+220394_code.launchpad.net,
Message: Please take a look.
Description: Fix store tests which use bzr
The various test suites in store should embed FakeHomeSuite not BaseSuite
https://code.launchpad.net/~wallyworld/juju-core/bzr-test-panic/+merge/220394
(do not edit description out of merge proposal)
Please review this at https://codereview.appspot.com/100590048/
Affected files (+13, -11 lines): A [revision details] M charm/repo_test.go M store/store_test.go
Index: [revision details] === added file '[revision details]' --- [revision details] 2012-01-01 00:00:00 +0000 +++ [revision details] 2012-01-01 00:00:00 +0000 @@ -0,0 +1,2 @@ +Old revision: tarmac-20140521080953-4mnjcoft8cg7dzht +New revision: <email address hidden>
Index: charm/repo_test.go === modified file 'charm/repo_test.go' --- charm/repo_test.go 2014-05-20 04:27:02 +0000 +++ charm/repo_test.go 2014-05-21 08:44:16 +0000 @@ -18,7 +18,7 @@ )
type StoreSuite struct { - testing.BaseSuite + testing.FakeHomeSuite server *charmtesting.MockStore store *charm.CharmStore } @@ -26,7 +26,7 @@ var _ = gc.Suite(&StoreSuite{})
func (s *StoreSuite) SetUpSuite(c *gc.C) { - s.BaseSuite.SetUpSuite(c) + s.FakeHomeSuite.SetUpSuite(c) s.server = charmtesting.NewMockStore(c, map[string]int{ "cs:series/good": 23, "cs:series/unwise": 23, @@ -36,7 +36,7 @@ }
func (s *StoreSuite) SetUpTest(c *gc.C) { - s.BaseSuite.SetUpTest(c) + s.FakeHomeSuite.SetUpTest(c) s.PatchValue(&charm.CacheDir, c.MkDir()) s.store = charm.NewStore(s.server.Address()) s.server.Downloads = nil @@ -49,7 +49,7 @@
func (s *StoreSuite) TearDownSuite(c *gc.C) { s.server.Close() - s.BaseSuite.TearDownSuite(c) + s.FakeHomeSuite.TearDownSuite(c) }
func (s *StoreSuite) TestMissing(c *gc.C) { @@ -374,7 +374,7 @@ }
type LocalRepoSuite struct { - testing.BaseSuite + testing.FakeHomeSuite repo *charm.LocalRepository seriesPath string } @@ -382,7 +382,7 @@ var _ = gc.Suite(&LocalRepoSuite{})
func (s *LocalRepoSuite) SetUpTest(c *gc.C) { - s.BaseSuite.SetUpTest(c) + s.FakeHomeSuite.SetUpTest(c) root := c.MkDir() s.repo = &charm.LocalRepository{Path: root} s.seriesPath = filepath.Join(root, "quantal")
Index: store/store_test.go === modified file 'store/store_test.go' --- store/store_test.go 2014-05-20 04:27:02 +0000 +++ store/store_test.go 2014-05-21 08:44:16 +0000 @@ -32,7 +32,7 @@ type StoreSuite struct { testing.MgoSuite testing.HTTPSuite - testing.BaseSuite + testing.FakeHomeSuite store *store.Store }
@@ -41,7 +41,7 @@ type TrivialSuite struct{}
func (s *StoreSuite) SetUpSuite(c *gc.C) { - s.BaseSuite.SetUpSuite(c) + s.FakeHomeSuite.SetUpSuite(c) s.MgoSuite.SetUpSuite(c) s.HTTPSuite.SetUpSuite(c) if os.Getenv("JUJU_NOTEST_MONGOJS") == "1" || testing.MgoServer.WithoutV8 { @@ -53,11 +53,11 @@ func (s *StoreSuite) TearDownSuite(c *gc.C) { s.HTTPSuite.TearDownSuite(c) s.MgoSuite.TearDownSuite(c) - s.BaseSuite.TearDownSuite(c) + s.FakeHomeSuite.TearDownSuite(c) }
func (s *StoreSuite) SetUpTest(c *gc.C) { - s.BaseSuite.SetUpTest(c) + s.FakeHomeSuite.SetUpTest(c) s.MgoSuite.SetUpTest(c) s.HTTPSuite.SetUpTest(c) var err error @@ -71,7 +71,7 @@ } s.HTTPSuite.TearDownTest(c) s.MgoSuite.TearDownTest(c) - s.BaseSuite.TearDownTest(c) + s.FakeHomeSuite.TearDownTest(c) }
// FakeCharmDir is a charm that implements the interface that the
« Back to merge proposal
Reviewers: mp+220394_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix store tests which use bzr
The various test suites in store should
embed FakeHomeSuite not BaseSuite
https:/ /code.launchpad .net/~wallyworl d/juju- core/bzr- test-panic/ +merge/ 220394
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/100590048/
Affected files (+13, -11 lines):
A [revision details]
M charm/repo_test.go
M store/store_test.go
Index: [revision details] 20140521080953- 4mnjcoft8cg7dzh t
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: charm/repo_test.go repo_test. go'
=== modified file 'charm/
--- charm/repo_test.go 2014-05-20 04:27:02 +0000
+++ charm/repo_test.go 2014-05-21 08:44:16 +0000
@@ -18,7 +18,7 @@
)
type StoreSuite struct { FakeHomeSuite MockStore &StoreSuite{ })
- testing.BaseSuite
+ testing.
server *charmtesting.
store *charm.CharmStore
}
@@ -26,7 +26,7 @@
var _ = gc.Suite(
func (s *StoreSuite) SetUpSuite(c *gc.C) { SetUpSuite( c) .SetUpSuite( c) NewMockStore( c, map[string]int{ series/ good": 23, series/ unwise" : 23,
- s.BaseSuite.
+ s.FakeHomeSuite
s.server = charmtesting.
"cs:
"cs:
@@ -36,7 +36,7 @@
}
func (s *StoreSuite) SetUpTest(c *gc.C) { SetUpTest( c) .SetUpTest( c) (&charm. CacheDir, c.MkDir()) s.server. Address( )) Downloads = nil
- s.BaseSuite.
+ s.FakeHomeSuite
s.PatchValue
s.store = charm.NewStore(
s.server.
@@ -49,7 +49,7 @@
func (s *StoreSuite) TearDownSuite(c *gc.C) { TearDownSuite( c) .TearDownSuite( c)
s.server.Close()
- s.BaseSuite.
+ s.FakeHomeSuite
}
func (s *StoreSuite) TestMissing(c *gc.C) {
@@ -374,7 +374,7 @@
}
type LocalRepoSuite struct { FakeHomeSuite LocalRepository &LocalRepoSuite {})
- testing.BaseSuite
+ testing.
repo *charm.
seriesPath string
}
@@ -382,7 +382,7 @@
var _ = gc.Suite(
func (s *LocalRepoSuite) SetUpTest(c *gc.C) { SetUpTest( c) .SetUpTest( c) LocalRepository {Path: root}
- s.BaseSuite.
+ s.FakeHomeSuite
root := c.MkDir()
s.repo = &charm.
s.seriesPath = filepath.Join(root, "quantal")
Index: store/store_test.go store_test. go' HTTPSuite FakeHomeSuite
=== modified file 'store/
--- store/store_test.go 2014-05-20 04:27:02 +0000
+++ store/store_test.go 2014-05-21 08:44:16 +0000
@@ -32,7 +32,7 @@
type StoreSuite struct {
testing.MgoSuite
testing.
- testing.BaseSuite
+ testing.
store *store.Store
}
@@ -41,7 +41,7 @@
type TrivialSuite struct{}
func (s *StoreSuite) SetUpSuite(c *gc.C) { SetUpSuite( c) .SetUpSuite( c) SetUpSuite( c) SetUpSuite( c) "JUJU_NOTEST_ MONGOJS" ) == "1" || testing. MgoServer. WithoutV8 TearDownSuite( c) TearDownSuite( c) TearDownSuite( c) .TearDownSuite( c)
- s.BaseSuite.
+ s.FakeHomeSuite
s.MgoSuite.
s.HTTPSuite.
if os.Getenv(
{
@@ -53,11 +53,11 @@
func (s *StoreSuite) TearDownSuite(c *gc.C) {
s.HTTPSuite.
s.MgoSuite.
- s.BaseSuite.
+ s.FakeHomeSuite
}
func (s *StoreSuite) SetUpTest(c *gc.C) { SetUpTest( c) .SetUpTest( c) SetUpTest( c) SetUpTest( c) TearDownTest( c) TearDownTest( c) TearDownTest( c) .TearDownTest( c)
- s.BaseSuite.
+ s.FakeHomeSuite
s.MgoSuite.
s.HTTPSuite.
var err error
@@ -71,7 +71,7 @@
}
s.HTTPSuite.
s.MgoSuite.
- s.BaseSuite.
+ s.FakeHomeSuite
}
// FakeCharmDir is a charm that implements the interface that the