~bac/juju-core/get-endpoints

« back to all changes in this revision

Viewing changes to juju/conn_test.go

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2013-03-19 10:30:08 UTC
  • mfrom: (1005.2.3 juju-core)
  • Revision ID: fwereade@gmail.com-20130319103008-wp3laoo158guhkyq
cmd/juju: bootstrap accepts --constraints

...and passes them on to environs.Bootstrap, which passes them on to
Environ.Bootstrap. Only the dummy provider actually handles constraints
at the moment -- so we can test the bootstrap command -- all the others
will be implemented in followups.

R=dimitern, jameinel, dfc, thumper
CC=
https://codereview.appspot.com/7610048

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        }
45
45
        env, err := environs.NewFromAttrs(attrs)
46
46
        c.Assert(err, IsNil)
47
 
        err = environs.Bootstrap(env, false)
 
47
        err = environs.Bootstrap(env, state.Constraints{}, false)
48
48
        c.Assert(err, IsNil)
49
49
 
50
50
        delete(attrs, "admin-secret")
65
65
func bootstrapEnv(c *C, envName string) {
66
66
        environ, err := environs.NewFromName(envName)
67
67
        c.Assert(err, IsNil)
68
 
        err = environs.Bootstrap(environ, false)
 
68
        err = environs.Bootstrap(environ, state.Constraints{}, false)
69
69
        c.Assert(err, IsNil)
70
70
}
71
71
 
112
112
        }
113
113
        env, err := environs.NewFromAttrs(attrs)
114
114
        c.Assert(err, IsNil)
115
 
        err = environs.Bootstrap(env, false)
 
115
        err = environs.Bootstrap(env, state.Constraints{}, false)
116
116
        c.Assert(err, IsNil)
117
117
        info, _, err := env.StateInfo()
118
118
        c.Assert(err, IsNil)
152
152
        }
153
153
        env, err := environs.NewFromAttrs(attrs)
154
154
        c.Assert(err, IsNil)
155
 
        err = environs.Bootstrap(env, false)
 
155
        err = environs.Bootstrap(env, state.Constraints{}, false)
156
156
        c.Assert(err, IsNil)
157
157
 
158
158
        // Make a new Conn, which will push the secrets.
190
190
                "ca-private-key":  coretesting.CAKey,
191
191
        })
192
192
        c.Assert(err, IsNil)
193
 
        err = environs.Bootstrap(env, false)
 
193
        err = environs.Bootstrap(env, state.Constraints{}, false)
194
194
        c.Assert(err, IsNil)
195
195
 
196
196
        // Check that Bootstrap has correctly used a hash
248
248
        }
249
249
        environ, err := environs.NewFromAttrs(attrs)
250
250
        c.Assert(err, IsNil)
251
 
        err = environs.Bootstrap(environ, false)
 
251
        err = environs.Bootstrap(environ, state.Constraints{}, false)
252
252
        c.Assert(err, IsNil)
253
253
        s.conn, err = juju.NewConn(environ)
254
254
        c.Assert(err, IsNil)