LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2012, 2013 Canonical Ltd. | 1 // Copyright 2012, 2013 Canonical Ltd. |
2 // Licensed under the AGPLv3, see LICENCE file for details. | 2 // Licensed under the AGPLv3, see LICENCE file for details. |
3 | 3 |
4 package client_test | 4 package client_test |
5 | 5 |
6 import ( | 6 import ( |
7 "fmt" | 7 "fmt" |
8 stdtesting "testing" | 8 stdtesting "testing" |
9 "time" | 9 "time" |
10 | 10 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // | 255 // |
256 // Note that there is nothing special about machine-0 | 256 // Note that there is nothing special about machine-0 |
257 // here - it's the environment manager in this scenario | 257 // here - it's the environment manager in this scenario |
258 // just because machine 0 has traditionally been the | 258 // just because machine 0 has traditionally been the |
259 // environment manager (bootstrap machine), so is | 259 // environment manager (bootstrap machine), so is |
260 // hopefully easier to remember as such. | 260 // hopefully easier to remember as such. |
261 func (s *baseSuite) setUpScenario(c *gc.C) (entities []string) { | 261 func (s *baseSuite) setUpScenario(c *gc.C) (entities []string) { |
262 add := func(e state.Entity) { | 262 add := func(e state.Entity) { |
263 entities = append(entities, e.Tag()) | 263 entities = append(entities, e.Tag()) |
264 } | 264 } |
265 » u, err := s.State.User("admin") | 265 » u, err := s.State.User(state.AdminUser) |
266 c.Assert(err, gc.IsNil) | 266 c.Assert(err, gc.IsNil) |
267 setDefaultPassword(c, u) | 267 setDefaultPassword(c, u) |
268 add(u) | 268 add(u) |
269 | 269 |
270 u, err = s.State.AddUser("other", "") | 270 u, err = s.State.AddUser("other", "") |
271 c.Assert(err, gc.IsNil) | 271 c.Assert(err, gc.IsNil) |
272 setDefaultPassword(c, u) | 272 setDefaultPassword(c, u) |
273 add(u) | 273 add(u) |
274 | 274 |
275 m, err := s.State.AddMachine("quantal", state.JobManageEnviron) | 275 m, err := s.State.AddMachine("quantal", state.JobManageEnviron) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 c.Assert(err, gc.IsNil) | 327 c.Assert(err, gc.IsNil) |
328 c.Assert(lu.IsPrincipal(), gc.Equals, false) | 328 c.Assert(lu.IsPrincipal(), gc.Equals, false) |
329 deployer, ok = lu.DeployerTag() | 329 deployer, ok = lu.DeployerTag() |
330 c.Assert(ok, gc.Equals, true) | 330 c.Assert(ok, gc.Equals, true) |
331 c.Assert(deployer, gc.Equals, fmt.Sprintf("unit-wordpress-%d", i
)) | 331 c.Assert(deployer, gc.Equals, fmt.Sprintf("unit-wordpress-%d", i
)) |
332 setDefaultPassword(c, lu) | 332 setDefaultPassword(c, lu) |
333 add(lu) | 333 add(lu) |
334 } | 334 } |
335 return | 335 return |
336 } | 336 } |
LEFT | RIGHT |