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

Issue 10344044: Some testing code refactoring.

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

Description

Some testing code refactoring. Move state.TestingEnvironConfig into testing/environ.go and rename to EnvironConfig, so usage looks like testing.EnvironConfig. Also renamed InvalidStateInfo and InvalidApiInfo to FakeStateInfo and FakeApiInfo. https://code.launchpad.net/~thumper/juju-core/invalid-state-rename/+merge/169962 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -29 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M environs/ec2/live_test.go View 1 chunk +1 line, -1 line 3 comments Download
M environs/jujutest/livetests.go View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/testing/conn.go View 3 chunks +6 lines, -6 lines 0 comments Download
M state/export_test.go View 1 chunk +1 line, -16 lines 0 comments Download
M state/initialize_test.go View 4 chunks +4 lines, -4 lines 2 comments Download
M testing/environ.go View 1 chunk +15 lines, -0 lines 2 comments Download

Messages

Total messages: 5
thumper
Please take a look.
10 years, 10 months ago (2013-06-17 23:14:48 UTC) #1
dave_cheney.net
LGTM. Very nice, thank you. https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go File environs/ec2/live_test.go (right): https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go#newcode133 environs/ec2/live_test.go:133: inst, err := t.Env.StartInstance("31", ...
10 years, 10 months ago (2013-06-17 23:42:13 UTC) #2
wallyworld
LGTM, niiiice https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go File environs/ec2/live_test.go (right): https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go#newcode133 environs/ec2/live_test.go:133: inst, err := t.Env.StartInstance("31", "fake_nonce", config.DefaultSeries, cons, ...
10 years, 10 months ago (2013-06-18 01:58:25 UTC) #3
thumper
https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go File environs/ec2/live_test.go (right): https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go#newcode133 environs/ec2/live_test.go:133: inst, err := t.Env.StartInstance("31", "fake_nonce", config.DefaultSeries, cons, testing.FakeStateInfo("31"), testing.FakeAPIInfo("31")) ...
10 years, 10 months ago (2013-06-18 03:16:12 UTC) #4
dave_cheney.net
10 years, 10 months ago (2013-06-18 03:44:14 UTC) #5
Jolly good. LGTM. 

On 18/06/2013, at 13:16, tim.penhey@canonical.com wrote:

> 
> https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go
> File environs/ec2/live_test.go (right):
> 
>
https://codereview.appspot.com/10344044/diff/1/environs/ec2/live_test.go#newc...
> environs/ec2/live_test.go:133: inst, err := t.Env.StartInstance("31",
> "fake_nonce", config.DefaultSeries, cons, testing.FakeStateInfo("31"),
> testing.FakeAPIInfo("31"))
> On 2013/06/18 01:58:25, wallyworld wrote:
>> On 2013/06/17 23:42:13, dfc wrote:
>> > s/Fake/Mock, whatever, personal preference.
> 
>> +1 :-)
> 
> Going to stick with Fakes here as Mocks are normally different
> implementations with internal assertions.
> 
> https://codereview.appspot.com/10344044/diff/1/testing/environ.go
> File testing/environ.go (right):
> 
> https://codereview.appspot.com/10344044/diff/1/testing/environ.go#newcode14
> testing/environ.go:14: // EnvironConfig returns a default environment
> configuration.
> On 2013/06/17 23:42:13, dfc wrote:
>> // EnvironConfig returns a default environment configuration suitable
> for
>> testing.
> 
> Done.
> 
> https://codereview.appspot.com/10344044/
Sign in to reply to this message.

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