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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/worker/undertaker/undertaker_test.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:
15
15
        "github.com/juju/juju/cmd/modelcmd"
16
16
        "github.com/juju/juju/environs"
17
17
        "github.com/juju/juju/environs/config"
18
 
        "github.com/juju/juju/environs/configstore"
19
18
        "github.com/juju/juju/jujuclient/jujuclienttesting"
20
19
        "github.com/juju/juju/provider/dummy"
21
20
        "github.com/juju/juju/state"
261
260
 
262
261
func dummyCfgAndUUID(c *gc.C) (*config.Config, string) {
263
262
        cfg := testingEnvConfig(c)
264
 
        uuid, ok := cfg.UUID()
265
 
        c.Assert(ok, jc.IsTrue)
 
263
        uuid := cfg.UUID()
266
264
        return cfg, uuid
267
265
}
268
266
 
272
270
        cfg, err := config.New(config.NoDefaults, dummy.SampleConfig())
273
271
        c.Assert(err, jc.ErrorIsNil)
274
272
        env, err := environs.Prepare(
275
 
                modelcmd.BootstrapContext(testing.Context(c)), configstore.NewMem(),
 
273
                modelcmd.BootstrapContext(testing.Context(c)),
276
274
                jujuclienttesting.NewMemStore(),
277
 
                "dummycontroller", environs.PrepareForBootstrapParams{Config: cfg},
 
275
                environs.PrepareParams{
 
276
                        BaseConfig:     cfg.AllAttrs(),
 
277
                        ControllerName: "dummycontroller",
 
278
                        CloudName:      "dummy",
 
279
                },
278
280
        )
279
281
        c.Assert(err, jc.ErrorIsNil)
280
282
        return env.Config()