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

Issue 13512051: cmd/jujud: sample usage of jc.Set

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by rog
Modified:
10 years, 7 months ago
Reviewers:
mp+184836, fwereade, thumper
Visibility:
Public.

Description

cmd/jujud: sample usage of jc.Set This branch demonstrates how jc.Set can be used to simplify various test code. There are other places, but this should do for a demo. https://code.launchpad.net/~rogpeppe/juju-core/387-use-testing-set/+merge/184836 Requires: https://code.launchpad.net/~rogpeppe/juju-core/386-testing-set-reset/+merge/184830 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/jujud: sample usage of jc.Set #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -23 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/bootstrap_test.go View 7 chunks +8 lines, -23 lines 1 comment Download

Messages

Total messages: 3
rog
Please take a look.
10 years, 7 months ago (2013-09-11 10:41:29 UTC) #1
fwereade
This looks slightly marginal, but enough of a win to LGTM. I hope we remember ...
10 years, 7 months ago (2013-09-11 14:26:48 UTC) #2
thumper
10 years, 7 months ago (2013-09-19 22:31:56 UTC) #3
https://codereview.appspot.com/13512051/diff/3001/cmd/juju/bootstrap_test.go
File cmd/juju/bootstrap_test.go (right):

https://codereview.appspot.com/13512051/diff/3001/cmd/juju/bootstrap_test.go#...
cmd/juju/bootstrap_test.go:58: defer jc.Set(&uploadTools,
mockUploadTools).Restore()
Early this morning my branch that moves and renames jc.Set landed.  Also
provided easy to use helpers in the base CleanupSuite.

Here we could now go:

s.PatchValue(&uploadTools, mockUploadTools)
Sign in to reply to this message.

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