~mfoord/juju-core/ha-rsyslog-2

« back to all changes in this revision

Viewing changes to environs/storage/storage_test.go

  • Committer: Michael Foord
  • Date: 2014-05-22 14:23:16 UTC
  • mfrom: (2728.22.5 009-ha-rsyslog-api)
  • Revision ID: michael.foord@canonical.com-20140522142316-hd3u3yyfi2xydzei
Merge back to good revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
var _ = gc.Suite(&datasourceSuite{})
28
28
 
29
29
type datasourceSuite struct {
30
 
        testing.FakeJujuHomeSuite
 
30
        home    *testing.FakeHome
31
31
        stor    storage.Storage
32
32
        baseURL string
33
33
}
41
41
`
42
42
 
43
43
func (s *datasourceSuite) SetUpTest(c *gc.C) {
44
 
        s.FakeJujuHomeSuite.SetUpTest(c)
45
 
        testing.WriteEnvironments(c, existingEnv)
 
44
        s.home = testing.MakeFakeHome(c, existingEnv, "existing")
46
45
        environ, err := environs.PrepareFromName("test", testing.Context(c), configstore.NewMem())
47
46
        c.Assert(err, gc.IsNil)
48
47
        s.stor = environ.Storage()
52
51
 
53
52
func (s *datasourceSuite) TearDownTest(c *gc.C) {
54
53
        dummy.Reset()
55
 
        s.FakeJujuHomeSuite.TearDownTest(c)
 
54
        s.home.Restore()
56
55
}
57
56
 
58
57
func (s *datasourceSuite) TestFetch(c *gc.C) {