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

Issue 10623043: Move state watcher test helpers to state/testing

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by gz
Modified:
12 years, 8 months ago
Reviewers:
mp+171614, jameinel, fwereade
Visibility:
Public.

Description

Move state watcher test helpers to state/testing I want to use the helpers in state/watcher_test.go for tests under the state/apiserver/machiner package. Because they are under the state_test package name but the state/ directory, this means moving the file somewhere else. Considered but rejected: * testing/watcher.go (circular import) * testing/apiserver/testing/watcher.go (not just apiserver related) So, created a new state/testing package and moved there. This also has issues: * We have way to many 'testing' packages * Need to make struct params Global (or write New... contructors) https://code.launchpad.net/~gz/juju-core/share_state_watcher_test/+merge/171614 (do not edit description out of merge proposal)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -91 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/machine_test.go View 7 chunks +16 lines, -15 lines 0 comments Download
M state/relationunit_test.go View 9 chunks +10 lines, -9 lines 0 comments Download
M state/service_test.go View 7 chunks +15 lines, -14 lines 0 comments Download
M state/state_test.go View 10 chunks +19 lines, -18 lines 0 comments Download
M state/testing/watcher.go View 9 chunks +23 lines, -23 lines 0 comments Download
M state/unit_test.go View 7 chunks +13 lines, -12 lines 0 comments Download

Messages

Total messages: 3
gz
Please take a look.
12 years, 8 months ago (2013-06-26 17:36:37 UTC) #1
fwereade
LGTM trivial frankly. Proliferation of testing packages isn't a question for today... and I'm not ...
12 years, 8 months ago (2013-06-26 23:48:40 UTC) #2
jameinel
12 years, 8 months ago (2013-06-27 11:22:23 UTC) #3
LGTM

I prefer the Exposed method to the New() method, because Exposed lets you do
stuff with them (like make sure they are valid or just use them in your logic.)
Sign in to reply to this message.

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