~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/state/testing/suite.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
        jujutesting "github.com/juju/testing"
9
9
        gc "gopkg.in/check.v1"
10
10
 
 
11
        "github.com/juju/juju/environs/config"
11
12
        "github.com/juju/juju/state"
12
13
        "github.com/juju/juju/testing"
13
14
        "github.com/juju/juju/testing/factory"
20
21
type StateSuite struct {
21
22
        jujutesting.MgoSuite
22
23
        testing.BaseSuite
23
 
        Policy  state.Policy
24
 
        State   *state.State
25
 
        Owner   names.UserTag
26
 
        Factory *factory.Factory
 
24
        Policy        state.Policy
 
25
        State         *state.State
 
26
        Owner         names.UserTag
 
27
        Factory       *factory.Factory
 
28
        InitialConfig *config.Config
27
29
}
28
30
 
29
31
func (s *StateSuite) SetUpSuite(c *gc.C) {
41
43
        s.BaseSuite.SetUpTest(c)
42
44
 
43
45
        s.Owner = names.NewLocalUserTag("test-admin")
44
 
        s.State = Initialize(c, s.Owner, nil, s.Policy)
 
46
        s.State = Initialize(c, s.Owner, s.InitialConfig, s.Policy)
45
47
        s.AddCleanup(func(*gc.C) { s.State.Close() })
46
48
        s.Factory = factory.NewFactory(s.State)
47
49
}