~rogpeppe/juju-core/438-local-instance-Addresses

« back to all changes in this revision

Viewing changes to environs/bootstrap/bootstrap_test.go

  • Committer: Tarmac
  • Author(s): Roger Peppe, John Arbash Meinel
  • Date: 2013-10-02 12:38:13 UTC
  • mfrom: (1717.1.42 375-dummy-prepare-state-id)
  • Revision ID: tarmac-20131002123813-3tidl1lj00d3a29c
[r=rogpeppe] environs/dummy: add state-id

This makes the dummy provider more like the other
providers in that the Environ does not refer
directly to the bootstrapped state, but is looked
up when operations are performed on it.

This is also a test case for adding attributes at Prepare
time - many tests needed changing to correctly
deal with this.

https://codereview.appspot.com/14207046/

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
                if test.AgentVersion != version.Zero {
152
152
                        attrs["agent-version"] = test.AgentVersion.String()
153
153
                }
154
 
                env, err := environs.NewFromAttrs(attrs)
 
154
                cfg, err := config.New(config.NoDefaults, attrs)
155
155
                c.Assert(err, gc.IsNil)
156
 
                env, err = environs.Prepare(env.Config(), configstore.NewMem())
 
156
                env, err := environs.Prepare(cfg, configstore.NewMem())
157
157
                c.Assert(err, gc.IsNil)
158
158
                envtesting.RemoveAllTools(c, env)
159
159