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

Issue 6120052: cmd/juju: working bootstrap and destroy commands

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by rog
Modified:
12 years ago
Reviewers:
mp+103532
Visibility:
Public.

Description

cmd/juju: working bootstrap and destroy commands https://code.launchpad.net/~rogpeppe/juju/go-more-commands/+merge/103532 Requires: https://code.launchpad.net/~rogpeppe/juju/go-dummy-broken-flag/+merge/103528 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/juju: working bootstrap and destroy commands #

Patch Set 3 : cmd/juju: working bootstrap and destroy commands #

Patch Set 4 : cmd/juju: working bootstrap and destroy commands #

Total comments: 15

Patch Set 5 : cmd/juju: working bootstrap and destroy commands #

Patch Set 6 : cmd/juju: working bootstrap and destroy commands #

Patch Set 7 : cmd/juju: working bootstrap and destroy commands #

Total comments: 2

Patch Set 8 : cmd/juju: working bootstrap and destroy commands #

Patch Set 9 : cmd/juju: working bootstrap and destroy commands #

Patch Set 10 : cmd/juju: working bootstrap and destroy commands #

Patch Set 11 : cmd/juju: working bootstrap and destroy commands #

Patch Set 12 : cmd/juju: working bootstrap and destroy commands #

Patch Set 13 : cmd/juju: working bootstrap and destroy commands #

Total comments: 6

Patch Set 14 : cmd/juju: working bootstrap and destroy commands #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -45 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/bootstrap.go View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -6 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 2 3 4 5 6 7 8 9 1 chunk +151 lines, -25 lines 0 comments Download
A cmd/juju/destroy.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +36 lines, -0 lines 0 comments Download
M cmd/juju/main.go View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M cmd/juju/main_test.go View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +53 lines, -2 lines 0 comments Download
M environs/dummy/environs.go View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M juju/conn.go View 3 chunks +8 lines, -5 lines 0 comments Download
M store/charmd/main.go View 1 1 chunk +1 line, -1 line 0 comments Download
M store/server_test.go View 1 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 16
rog
see also https://codereview.appspot.com/5901058 which is a previous version of this CL with a different pre-requisite.
12 years ago (2012-04-25 17:59:39 UTC) #1
rog
Please take a look.
12 years ago (2012-04-26 11:32:27 UTC) #2
rog
Please take a look.
12 years ago (2012-04-26 11:34:38 UTC) #3
TheMue
Only minor comments about the placement of test data. https://codereview.appspot.com/6120052/diff/8001/cmd/juju/cmd_test.go File cmd/juju/cmd_test.go (right): https://codereview.appspot.com/6120052/diff/8001/cmd/juju/cmd_test.go#newcode96 cmd/juju/cmd_test.go:96: ...
12 years ago (2012-04-26 11:44:47 UTC) #4
rog
https://codereview.appspot.com/6120052/diff/8001/cmd/juju/cmd_test.go File cmd/juju/cmd_test.go (right): https://codereview.appspot.com/6120052/diff/8001/cmd/juju/cmd_test.go#newcode96 cmd/juju/cmd_test.go:96: // All members of genericTests are tested for the ...
12 years ago (2012-04-26 12:10:26 UTC) #5
fwereade
https://codereview.appspot.com/6120052/diff/8001/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/6120052/diff/8001/cmd/juju/bootstrap.go#newcode12 cmd/juju/bootstrap.go:12: Conn *juju.Conn Consider adding a type used by both ...
12 years ago (2012-04-26 12:28:25 UTC) #6
rog
Please take a look. https://codereview.appspot.com/6120052/diff/8001/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/6120052/diff/8001/cmd/juju/bootstrap.go#newcode12 cmd/juju/bootstrap.go:12: Conn *juju.Conn On 2012/04/26 12:28:25, ...
12 years ago (2012-04-26 13:12:07 UTC) #7
fwereade
LGTM modulo query below https://codereview.appspot.com/6120052/diff/6003/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (left): https://codereview.appspot.com/6120052/diff/6003/cmd/juju/bootstrap.go#oldcode31 cmd/juju/bootstrap.go:31: return cmd.CheckEmpty(f.Args()) What's wrong with ...
12 years ago (2012-04-26 13:46:32 UTC) #8
rog
Please take a look. https://codereview.appspot.com/6120052/diff/6003/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (left): https://codereview.appspot.com/6120052/diff/6003/cmd/juju/bootstrap.go#oldcode31 cmd/juju/bootstrap.go:31: return cmd.CheckEmpty(f.Args()) On 2012/04/26 13:46:32, ...
12 years ago (2012-04-26 15:43:34 UTC) #9
rog
Please take a look.
12 years ago (2012-04-26 16:14:59 UTC) #10
rog
Please take a look.
12 years ago (2012-04-26 16:21:16 UTC) #11
rog
Please take a look.
12 years ago (2012-04-26 16:54:20 UTC) #12
rog
Please take a look.
12 years ago (2012-04-26 16:55:34 UTC) #13
niemeyer
https://codereview.appspot.com/6120052/diff/9013/cmd/juju/cmd_test.go File cmd/juju/cmd_test.go (right): https://codereview.appspot.com/6120052/diff/9013/cmd/juju/cmd_test.go#newcode112 cmd/juju/cmd_test.go:112: func runCommand(com cmd.Command, args ...string) (opc chan dummy.Operation, errc ...
12 years ago (2012-04-26 18:35:16 UTC) #14
niemeyer
Sorry, published too soon. There's one trivial, and LGTM, even with the test question unsorted ...
12 years ago (2012-04-26 18:38:34 UTC) #15
rog
12 years ago (2012-04-27 08:28:03 UTC) #16
*** Submitted:

cmd/juju: working bootstrap and destroy commands

R=TheMue, fwereade, niemeyer
CC=
https://codereview.appspot.com/6120052

https://codereview.appspot.com/6120052/diff/9013/cmd/juju/cmd_test.go
File cmd/juju/cmd_test.go (right):

https://codereview.appspot.com/6120052/diff/9013/cmd/juju/cmd_test.go#newcode112
cmd/juju/cmd_test.go:112: func runCommand(com cmd.Command, args ...string) (opc
chan dummy.Operation, errc chan error) {
On 2012/04/26 18:35:16, niemeyer wrote:
> That's a lot nicer, thanks. This might even make the table design feel better,
> at least for error conditions I suppose.

Thanks.
I think I've come around to the idea that table-based isn't great for this
particular test. When we get to the test for client upload, we'll see why, I
believe.

https://codereview.appspot.com/6120052/diff/9013/cmd/juju/cmd_test.go#newcode138
cmd/juju/cmd_test.go:138: // bootstrap with broken environment
On 2012/04/26 18:35:16, niemeyer wrote:
> So, that's what I was referring to in the other CL. What is this actually
> testing? This test makes every single method in the dummy environment explode,
> and then check that *something* verified an err return so that it pops up. I'd
> like to hear your ideas on this as it feels to me like an unclear strategy
with
> smoke and mirrors.

The idea is to test the error path. I wonder if it would be better if the dummy
environment did register the operation as well as returning the "broken" error.
Then we'd be checking no only that the correct call was made, but also that the
error path worked. We'll talk about it later.

https://codereview.appspot.com/6120052/diff/9013/cmd/juju/destroy.go
File cmd/juju/destroy.go (right):

https://codereview.appspot.com/6120052/diff/9013/cmd/juju/destroy.go#newcode27
cmd/juju/destroy.go:27: if err := cmd.CheckEmpty(f.Args()); err != nil {
On 2012/04/26 18:38:34, niemeyer wrote:
> return cmd.CheckEmpty(f.Args())

Done.
Sign in to reply to this message.

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