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

Issue 100620046: cmd/juju: "juju user add" now takes --password

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

Description

cmd/juju: "juju user add" now takes --password As per requirements, changed the password option for the "user add" command from a positional argument to an option (--password). This is a better way of handling an optional argument anyway. Also fixed a number of problems with the tests (excessive copy and paste, misnamed test names etc). https://code.launchpad.net/~menno.smits/juju-core/user-add-password-opt/+merge/220416 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/juju: "juju user add" now takes --password #

Patch Set 3 : cmd/juju: "juju user add" now takes --password #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -76 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/removeuser_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/user_add.go View 3 chunks +17 lines, -19 lines 2 comments Download
M cmd/juju/user_add_test.go View 1 3 chunks +80 lines, -56 lines 2 comments Download

Messages

Total messages: 7
menn0
Please take a look.
9 years, 11 months ago (2014-05-21 10:04:15 UTC) #1
menn0
Please take a look.
9 years, 11 months ago (2014-05-21 10:14:09 UTC) #2
dave_cheney.net
On 2014/05/21 10:14:09, menn0 wrote: > Please take a look. I'm seeing a test failure, ...
9 years, 11 months ago (2014-05-22 04:10:54 UTC) #3
menn0
On 2014/05/22 04:10:54, dfc wrote: > On 2014/05/21 10:14:09, menn0 wrote: > > Please take ...
9 years, 11 months ago (2014-05-22 04:32:50 UTC) #4
menn0
Please take a look.
9 years, 11 months ago (2014-05-22 04:36:46 UTC) #5
dave_cheney.net
LGTM. Thanks. https://codereview.appspot.com/100620046/diff/40001/cmd/juju/user_add.go File cmd/juju/user_add.go (right): https://codereview.appspot.com/100620046/diff/40001/cmd/juju/user_add.go#newcode64 cmd/juju/user_add.go:64: return nil delete, this code is unreachable ...
9 years, 11 months ago (2014-05-22 05:10:56 UTC) #6
menn0
9 years, 11 months ago (2014-05-22 05:32:12 UTC) #7
Thanks

https://codereview.appspot.com/100620046/diff/40001/cmd/juju/user_add.go
File cmd/juju/user_add.go (right):

https://codereview.appspot.com/100620046/diff/40001/cmd/juju/user_add.go#newc...
cmd/juju/user_add.go:64: return nil
On 2014/05/22 05:10:55, dfc wrote:
> delete, this code is unreachable

What about if len(args) == 1?

https://codereview.appspot.com/100620046/diff/40001/cmd/juju/user_add_test.go
File cmd/juju/user_add_test.go (left):

https://codereview.appspot.com/100620046/diff/40001/cmd/juju/user_add_test.go...
cmd/juju/user_add_test.go:50: func (s *UserAddCommandSuite)
TestJenvYamlFileOutput(c *gc.C) {
On 2014/05/22 05:10:56, dfc wrote:
> Please try to avoid moving large blocks of code around as it makes the diff
> harder to read.

Sorry. The original tests weren't too flash (test method names the wrong way
around and more) so I ended up doing quite a bit of reorganisation. In
retrospect, I should have done the clean up as a separate change and perhaps in
multiple steps.
Sign in to reply to this message.

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