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

Issue 13326044: api/watcher: return interface

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

Description

api/watcher: return interface This means that worker implementations cannot return a nil value masquerading as a non-nil interface. It's difficult to know how to test this properly without mocking the API. Also couldn't resist a drive-by simplification of the worker MustErr test logic. https://code.launchpad.net/~rogpeppe/juju-core/378-notifyworker-fix/+merge/182649 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : api/watcher: return interface #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -91 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/deployer/machine.go View 1 chunk +1 line, -1 line 0 comments Download
M state/api/machiner/machine.go View 1 chunk +1 line, -1 line 0 comments Download
M state/api/uniter/unit.go View 1 chunk +1 line, -1 line 0 comments Download
M state/api/upgrader/upgrader.go View 1 chunk +1 line, -1 line 0 comments Download
M state/api/watcher/interfaces.go View 1 chunk +1 line, -1 line 0 comments Download
M state/api/watcher/watcher.go View 7 chunks +13 lines, -13 lines 0 comments Download
M worker/cleaner/cleaner.go View 2 chunks +2 lines, -2 lines 0 comments Download
M worker/deployer/deployer.go View 2 chunks +2 lines, -2 lines 0 comments Download
M worker/export_test.go View 1 chunk +8 lines, -8 lines 0 comments Download
M worker/machiner/machiner.go View 2 chunks +2 lines, -2 lines 0 comments Download
M worker/minunitsworker/minunitsworker.go View 2 chunks +2 lines, -2 lines 0 comments Download
M worker/notifyworker.go View 5 chunks +7 lines, -8 lines 0 comments Download
M worker/notifyworker_test.go View 7 chunks +9 lines, -21 lines 0 comments Download
M worker/stringsworker.go View 5 chunks +3 lines, -8 lines 0 comments Download
M worker/stringsworker_test.go View 5 chunks +5 lines, -20 lines 0 comments Download

Messages

Total messages: 2
rog
Please take a look.
10 years, 8 months ago (2013-08-28 14:10:06 UTC) #1
fwereade
10 years, 8 months ago (2013-08-28 15:29:31 UTC) #2
LGTM, thanks for tidying up MustErr.
Sign in to reply to this message.

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