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

Issue 102970043: Add a display name option for new users

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by thumper
Modified:
9 years, 11 months ago
Reviewers:
menn0, waigani, mp+221823
Visibility:
Public.

Description

Add a display name option for new users This ended up being more work than I hoped as I refactored the apiserver parts, many tests, and made sure there was backwards compatability with older client apis. Also changed how the CLI command was tested so it didn't need a JujuConnSuite. https://code.launchpad.net/~thumper/juju-core/user-display-name/+merge/221823 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -240 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M agent/bootstrap.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/authorizedkeys_test.go View 4 chunks +4 lines, -8 lines 0 comments Download
M cmd/juju/user_add.go View 5 chunks +43 lines, -28 lines 2 comments Download
M cmd/juju/user_add_test.go View 2 chunks +148 lines, -76 lines 0 comments Download
M juju/conn_test.go View 1 chunk +1 line, -1 line 0 comments Download
M juju/testing/conn.go View 1 chunk +6 lines, -0 lines 0 comments Download
M provider/dummy/environs.go View 1 chunk +1 line, -1 line 0 comments Download
M state/api/params/params.go View 1 chunk +12 lines, -2 lines 0 comments Download
M state/api/usermanager/client.go View 1 chunk +8 lines, -7 lines 2 comments Download
M state/api/usermanager/client_test.go View 3 chunks +18 lines, -5 lines 2 comments Download
M state/apiserver/charms_test.go View 1 chunk +2 lines, -5 lines 2 comments Download
M state/apiserver/client/api_test.go View 1 chunk +1 line, -2 lines 0 comments Download
M state/apiserver/client/client_test.go View 2 chunks +2 lines, -5 lines 0 comments Download
M state/apiserver/login_test.go View 1 chunk +1 line, -2 lines 0 comments Download
M state/apiserver/usermanager/usermanager.go View 4 chunks +9 lines, -4 lines 0 comments Download
M state/apiserver/usermanager/usermanager_test.go View 3 chunks +24 lines, -19 lines 0 comments Download
M state/compat_test.go View 1 chunk +1 line, -1 line 0 comments Download
M state/conn_test.go View 1 chunk +1 line, -1 line 0 comments Download
M state/megawatcher_internal_test.go View 1 chunk +1 line, -1 line 0 comments Download
M state/state_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M state/user.go View 5 chunks +16 lines, -9 lines 0 comments Download
M state/user_test.go View 6 chunks +49 lines, -60 lines 3 comments Download

Messages

Total messages: 5
thumper
Please take a look.
9 years, 11 months ago (2014-06-03 04:31:15 UTC) #1
menn0
LGTM - only minor comments and praise added in-line. The user add tests look much ...
9 years, 11 months ago (2014-06-03 05:17:26 UTC) #2
waigani
On 2014/06/03 05:17:26, menn0 wrote: > LGTM - only minor comments and praise added in-line. ...
9 years, 11 months ago (2014-06-03 21:29:13 UTC) #3
waigani
https://codereview.appspot.com/102970043/diff/1/state/user_test.go File state/user_test.go (right): https://codereview.appspot.com/102970043/diff/1/state/user_test.go#newcode75 state/user_test.go:75: user := s.makeUser(c) It seems you are making a ...
9 years, 11 months ago (2014-06-03 21:29:27 UTC) #4
thumper
9 years, 11 months ago (2014-06-04 04:01:23 UTC) #5
New branch is moving to github.

https://codereview.appspot.com/102970043/diff/1/state/api/usermanager/client_...
File state/api/usermanager/client_test.go (right):

https://codereview.appspot.com/102970043/diff/1/state/api/usermanager/client_...
state/api/usermanager/client_test.go:42: err := s.APIState.Call("UserManager",
"", "AddUser", userArgs, results)
On 2014/06/03 05:17:26, menn0 wrote:
> Maybe add a comment here about why s.APIState.Call("UserManager",...) is used
> here instead of s.usermanager.AddUser()? I understand why but had to think
about
> it for a bit.

Done.

https://codereview.appspot.com/102970043/diff/1/state/apiserver/charms_test.go
File state/apiserver/charms_test.go (left):

https://codereview.appspot.com/102970043/diff/1/state/apiserver/charms_test.g...
state/apiserver/charms_test.go:39: password, err := utils.RandomPassword()
On 2014/06/03 05:17:26, menn0 wrote:
> Play devil's advocate: this change means the user has a fixed password instead
> of a random one. Are you sure that doesn't negatively impact any existing
tests?
> I can't think of why it would but it is a test functionality change.

Sure, but the tests all still pass :-)

I'm considering a way to change the way we create test fixture objects.  A
cunning plan.

https://codereview.appspot.com/102970043/diff/1/state/user_test.go
File state/user_test.go (right):

https://codereview.appspot.com/102970043/diff/1/state/user_test.go#newcode75
state/user_test.go:75: user := s.makeUser(c)
On 2014/06/03 21:29:26, waigani wrote:
> It seems you are making a user for every test. Why not makeUser in SetUpTest?

Not quite every test :-)
Sign in to reply to this message.

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