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

Issue 6963050: environs/cloudinit: refactor tests

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by rog
Modified:
11 years, 3 months ago
Reviewers:
mp+140909
Visibility:
Public.

Description

environs/cloudinit: refactor tests In an upcoming CL, I was starting to add ever more logic to the script tests, and a different approach seemed like a better way. By specifying the entire script in the tests, we get a much better idea of what the cloudinit scripts will look like as a whole, making it easier to diagnose problems earlier. The down side is we'll need to change the tests more often, but they're easier to change, and it seems like less smoke and mirrors. https://code.launchpad.net/~rogpeppe/juju-core/182-cloudinit-refactor-tests/+merge/140909 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : environs/cloudinit: refactor tests #

Patch Set 3 : environs/cloudinit: refactor tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -131 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 8 chunks +128 lines, -131 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
11 years, 4 months ago (2012-12-20 14:28:31 UTC) #1
fwereade
LGTM https://codereview.appspot.com/6963050/diff/1/environs/cloudinit/cloudinit_test.go File environs/cloudinit/cloudinit_test.go (right): https://codereview.appspot.com/6963050/diff/1/environs/cloudinit/cloudinit_test.go#newcode112 environs/cloudinit/cloudinit_test.go:112: cat >> /etc/init/jujud-machine-99\.conf << 'EOF'\\n.*/var/lib/juju/tools/machine-99/jujud machine --state-servers 'state-addr\.example\.com' ...
11 years, 4 months ago (2012-12-20 17:09:03 UTC) #2
TheMue
LGTM https://codereview.appspot.com/6963050/diff/1/environs/cloudinit/cloudinit_test.go File environs/cloudinit/cloudinit_test.go (right): https://codereview.appspot.com/6963050/diff/1/environs/cloudinit/cloudinit_test.go#newcode112 environs/cloudinit/cloudinit_test.go:112: cat >> /etc/init/jujud-machine-99\.conf << 'EOF'\\n.*/var/lib/juju/tools/machine-99/jujud machine --state-servers 'state-addr\.example\.com' ...
11 years, 3 months ago (2013-01-11 16:47:03 UTC) #3
rog
11 years, 3 months ago (2013-01-11 16:52:25 UTC) #4
*** Submitted:

environs/cloudinit: refactor tests

In an upcoming CL, I was starting to add ever more
logic to the script tests, and a different approach seemed
like a better way.

By specifying the entire script in the tests, we
get a much better idea of what the cloudinit
scripts will look like as a whole, making it
easier to diagnose problems earlier.

The down side is we'll need to change the tests
more often, but they're easier to change, and
it seems like less smoke and mirrors.

R=fwereade, TheMue
CC=
https://codereview.appspot.com/6963050
Sign in to reply to this message.

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