Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(625)

Delta Between Two Patch Sets: state/apiserver/client/api_test.go

Issue 61620043: Started working on add/remove user support
Left Patch Set: Created 11 years, 2 months ago
Right Patch Set: Started working on add/remove user support Created 11 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « state/apiserver/agent/agent_test.go ('k') | state/apiserver/common/password.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(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
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
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 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b