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

Issue 6260054: cmd/juju{c,d,}: fix testing issues by using package main (Closed)

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

Description

cmd/juju{c,d,}: fix testing issues by using package main This issue has been biting roger and I for a while. After spending some time on it today and looking at other examples from the std lib of testing main packages, it looks like when testing main (ie, from cmd/go) all the tests run in package main. Our use of main_test appears unique. https://code.launchpad.net/~dave-cheney/juju/go-cmd-jujud-fix-testing/+merge/107905 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/juju{c,d,}: fix testing issues by using package main #

Patch Set 3 : cmd/juju{c,d,}: fix testing issues by using package main #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -43 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 4 chunks +8 lines, -9 lines 0 comments Download
M cmd/juju/main_test.go View 1 2 chunks +2 lines, -3 lines 0 comments Download
M cmd/jujuc/main_test.go View 1 4 chunks +3 lines, -4 lines 0 comments Download
M cmd/jujud/initzk_test.go View 2 chunks +3 lines, -4 lines 0 comments Download
M cmd/jujud/machine_test.go View 3 chunks +6 lines, -7 lines 0 comments Download
M cmd/jujud/provisioning_test.go View 2 chunks +4 lines, -5 lines 0 comments Download
M cmd/jujud/unit_test.go View 3 chunks +7 lines, -8 lines 0 comments Download
M cmd/jujud/util_test.go View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 12
dfc
Please take a look.
11 years, 10 months ago (2012-05-30 02:17:39 UTC) #1
fwereade
LGTM; can I ask you to do the same for the other main_test packages, for ...
11 years, 10 months ago (2012-05-30 07:30:00 UTC) #2
dfc
Of course. But please let me wait for the feedback from the rest of the ...
11 years, 10 months ago (2012-05-30 10:49:18 UTC) #3
niemeyer
A bit unfortunate to miss the separation, but LGTM. Let's please just watch out to ...
11 years, 10 months ago (2012-05-30 21:30:34 UTC) #4
dfc
If you're happy to use the export_test.go shim I proposed in the PA strawman, that ...
11 years, 10 months ago (2012-05-30 21:53:29 UTC) #5
dfc
Please take a look.
11 years, 10 months ago (2012-05-30 22:53:53 UTC) #6
dfc
On 2012/05/30 22:53:53, dfc wrote: > Please take a look. I've extended the scope of ...
11 years, 10 months ago (2012-05-30 22:55:45 UTC) #7
fwereade
LGTM; thanks :).
11 years, 10 months ago (2012-05-30 23:27:53 UTC) #8
dfc
On 2012/05/30 23:27:53, fwereade wrote: > LGTM; thanks :). Thanks. I'll submit this later today ...
11 years, 10 months ago (2012-05-30 23:28:39 UTC) #9
niemeyer
Still LGTM
11 years, 10 months ago (2012-05-31 16:39:26 UTC) #10
niemeyer
Still LGTM
11 years, 10 months ago (2012-05-31 16:39:26 UTC) #11
dfc
11 years, 10 months ago (2012-05-31 21:23:16 UTC) #12
*** Submitted:

cmd/juju{c,d,}: fix testing issues by using package main

This issue has been biting roger and I for a while. After spending 
some time on it today and looking at other examples from the std lib
of testing main packages, it looks like when testing main (ie, from cmd/go)
all the tests run in package main. Our use of main_test appears unique.

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

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