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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/environs/tools/urls_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:
13
13
        gc "gopkg.in/check.v1"
14
14
 
15
15
        "github.com/juju/juju/environs"
16
 
        "github.com/juju/juju/environs/config"
17
 
        "github.com/juju/juju/environs/configstore"
18
16
        "github.com/juju/juju/environs/simplestreams"
19
17
        sstesting "github.com/juju/juju/environs/simplestreams/testing"
20
18
        envtesting "github.com/juju/juju/environs/testing"
45
43
                        "agent-metadata-url": toolsMetadataURL,
46
44
                })
47
45
        }
48
 
        cfg, err := config.New(config.NoDefaults, attrs)
49
 
        c.Assert(err, jc.ErrorIsNil)
50
 
        env, err := environs.Prepare(envtesting.BootstrapContext(c), configstore.NewMem(),
 
46
        env, err := environs.Prepare(envtesting.BootstrapContext(c),
51
47
                jujuclienttesting.NewMemStore(),
52
 
                cfg.Name(), environs.PrepareForBootstrapParams{Config: cfg})
 
48
                environs.PrepareParams{
 
49
                        ControllerName: attrs["name"].(string),
 
50
                        BaseConfig:     attrs,
 
51
                        CloudName:      "dummy",
 
52
                },
 
53
        )
53
54
        c.Assert(err, jc.ErrorIsNil)
54
55
        return env
55
56
}