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

Issue 9677044: Fix relation-list with no relations

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by thumper
Modified:
10 years, 11 months ago
Reviewers:
mp+165263, dave, wallyworld
Visibility:
Public.

Description

Fix relation-list with no relations lp:1182224 has relation-list returning null with json output if there are no relations. This was due to the returning of an uninitialized slice. There was a test for this but it was using a test context that behaved differently. The test context has been updated, and the command fixed. https://code.launchpad.net/~thumper/juju-core/fix-uniter-context-relation-names/+merge/165263 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : Fix relation-list with no relations #

Patch Set 3 : Fix relation-list with no relations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -2 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/output_test.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/relation-list.go View 1 1 chunk +5 lines, -1 line 0 comments Download
M worker/uniter/jujuc/util_test.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8
thumper
Please take a look.
10 years, 11 months ago (2013-05-22 22:58:55 UTC) #1
dave_cheney.net
LGTM. You can take or leave my comments. https://codereview.appspot.com/9677044/diff/1/worker/uniter/context.go File worker/uniter/context.go (right): https://codereview.appspot.com/9677044/diff/1/worker/uniter/context.go#newcode309 worker/uniter/context.go:309: func ...
10 years, 11 months ago (2013-05-23 01:31:51 UTC) #2
wallyworld
LGTM, agree with Dave's comments
10 years, 11 months ago (2013-05-23 01:33:05 UTC) #3
niemeyer
https://codereview.appspot.com/9677044/diff/1/worker/uniter/context.go File worker/uniter/context.go (right): https://codereview.appspot.com/9677044/diff/1/worker/uniter/context.go#newcode310 worker/uniter/context.go:310: units = []string{} On 2013/05/23 01:31:51, dfc wrote: > ...
10 years, 11 months ago (2013-05-23 02:38:35 UTC) #4
thumper
On 2013/05/23 02:38:35, niemeyer wrote: > https://codereview.appspot.com/9677044/diff/1/worker/uniter/context.go > File worker/uniter/context.go (right): > > https://codereview.appspot.com/9677044/diff/1/worker/uniter/context.go#newcode310 > ...
10 years, 11 months ago (2013-05-23 03:35:55 UTC) #5
thumper
Please take a look.
10 years, 11 months ago (2013-05-23 03:37:39 UTC) #6
wallyworld
LGTM
10 years, 11 months ago (2013-05-23 03:47:30 UTC) #7
thumper
10 years, 11 months ago (2013-05-23 04:51:24 UTC) #8
*** Submitted:

Fix relation-list with no relations

lp:1182224 has relation-list returning null with json output if there are
no relations.  This was due to the returning of an uninitialized slice.

There was a test for this but it was using a test context that behaved
differently.  The test context has been updated, and the command fixed.

R=dfc, wallyworld, niemeyer
CC=
https://codereview.appspot.com/9677044
Sign in to reply to this message.

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