Merge lp:~wallyworld/juju-core/bzr-test-panic into lp:~go-bot/juju-core/trunk

Proposed by Ian Booth
Status: Merged
Approved by: Ian Booth
Approved revision: no longer in the source branch.
Merged at revision: 2761
Proposed branch: lp:~wallyworld/juju-core/bzr-test-panic
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 102 lines (+11/-11)
2 files modified
charm/repo_test.go (+6/-6)
store/store_test.go (+5/-5)
To merge this branch: bzr merge lp:~wallyworld/juju-core/bzr-test-panic
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+220394@code.launchpad.net

Commit message

Fix store tests which use bzr

The various test suites in store should
embed FakeHomeSuite not BaseSuite

https://codereview.appspot.com/100590048/

Description of the change

Fix store tests which use bzr

The various test suites in store should
embed FakeHomeSuite not BaseSuite

https://codereview.appspot.com/100590048/

To post a comment you must log in.
Revision history for this message
Ian Booth (wallyworld) wrote :
Download full text (3.4 KiB)

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.SetUpTes...

Read more...

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

On 2014/05/21 08:46:43, wallyworld wrote:
> Please take a look.

LGTM

https://codereview.appspot.com/100590048/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charm/repo_test.go'
2--- charm/repo_test.go 2014-05-20 04:27:02 +0000
3+++ charm/repo_test.go 2014-05-21 08:56:39 +0000
4@@ -18,7 +18,7 @@
5 )
6
7 type StoreSuite struct {
8- testing.BaseSuite
9+ testing.FakeHomeSuite
10 server *charmtesting.MockStore
11 store *charm.CharmStore
12 }
13@@ -26,7 +26,7 @@
14 var _ = gc.Suite(&StoreSuite{})
15
16 func (s *StoreSuite) SetUpSuite(c *gc.C) {
17- s.BaseSuite.SetUpSuite(c)
18+ s.FakeHomeSuite.SetUpSuite(c)
19 s.server = charmtesting.NewMockStore(c, map[string]int{
20 "cs:series/good": 23,
21 "cs:series/unwise": 23,
22@@ -36,7 +36,7 @@
23 }
24
25 func (s *StoreSuite) SetUpTest(c *gc.C) {
26- s.BaseSuite.SetUpTest(c)
27+ s.FakeHomeSuite.SetUpTest(c)
28 s.PatchValue(&charm.CacheDir, c.MkDir())
29 s.store = charm.NewStore(s.server.Address())
30 s.server.Downloads = nil
31@@ -49,7 +49,7 @@
32
33 func (s *StoreSuite) TearDownSuite(c *gc.C) {
34 s.server.Close()
35- s.BaseSuite.TearDownSuite(c)
36+ s.FakeHomeSuite.TearDownSuite(c)
37 }
38
39 func (s *StoreSuite) TestMissing(c *gc.C) {
40@@ -374,7 +374,7 @@
41 }
42
43 type LocalRepoSuite struct {
44- testing.BaseSuite
45+ testing.FakeHomeSuite
46 repo *charm.LocalRepository
47 seriesPath string
48 }
49@@ -382,7 +382,7 @@
50 var _ = gc.Suite(&LocalRepoSuite{})
51
52 func (s *LocalRepoSuite) SetUpTest(c *gc.C) {
53- s.BaseSuite.SetUpTest(c)
54+ s.FakeHomeSuite.SetUpTest(c)
55 root := c.MkDir()
56 s.repo = &charm.LocalRepository{Path: root}
57 s.seriesPath = filepath.Join(root, "quantal")
58
59=== modified file 'store/store_test.go'
60--- store/store_test.go 2014-05-20 04:27:02 +0000
61+++ store/store_test.go 2014-05-21 08:56:39 +0000
62@@ -32,7 +32,7 @@
63 type StoreSuite struct {
64 testing.MgoSuite
65 testing.HTTPSuite
66- testing.BaseSuite
67+ testing.FakeHomeSuite
68 store *store.Store
69 }
70
71@@ -41,7 +41,7 @@
72 type TrivialSuite struct{}
73
74 func (s *StoreSuite) SetUpSuite(c *gc.C) {
75- s.BaseSuite.SetUpSuite(c)
76+ s.FakeHomeSuite.SetUpSuite(c)
77 s.MgoSuite.SetUpSuite(c)
78 s.HTTPSuite.SetUpSuite(c)
79 if os.Getenv("JUJU_NOTEST_MONGOJS") == "1" || testing.MgoServer.WithoutV8 {
80@@ -53,11 +53,11 @@
81 func (s *StoreSuite) TearDownSuite(c *gc.C) {
82 s.HTTPSuite.TearDownSuite(c)
83 s.MgoSuite.TearDownSuite(c)
84- s.BaseSuite.TearDownSuite(c)
85+ s.FakeHomeSuite.TearDownSuite(c)
86 }
87
88 func (s *StoreSuite) SetUpTest(c *gc.C) {
89- s.BaseSuite.SetUpTest(c)
90+ s.FakeHomeSuite.SetUpTest(c)
91 s.MgoSuite.SetUpTest(c)
92 s.HTTPSuite.SetUpTest(c)
93 var err error
94@@ -71,7 +71,7 @@
95 }
96 s.HTTPSuite.TearDownTest(c)
97 s.MgoSuite.TearDownTest(c)
98- s.BaseSuite.TearDownTest(c)
99+ s.FakeHomeSuite.TearDownTest(c)
100 }
101
102 // FakeCharmDir is a charm that implements the interface that the

Subscribers

People subscribed via source and target branches

to status/vote changes: