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

Issue 86080043: cmd/jujud: call SetAPIHostPorts in tests

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by rog
Modified:
10 years ago
Reviewers:
dimitern, mp+214971
Visibility:
Public.

Description

cmd/jujud: call SetAPIHostPorts in tests Without APIHostPorts set in state, the apiaddressupdater worker sets the API addresses in the agent configuration to an empty set very soon after the agent starts. The tests sometimes passed previously because APIWorker could grab the addresses before that happened. https://code.launchpad.net/~rogpeppe/juju-core/542-jujud-setapihostports-in-tests/+merge/214971 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/jujud: call SetAPIHostPorts in tests #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/agent_test.go View 4 chunks +30 lines, -0 lines 1 comment Download
M state/api/apiclient.go View 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 2
rog
Please take a look.
10 years ago (2014-04-09 15:21:58 UTC) #1
dimitern
10 years ago (2014-04-09 15:29:03 UTC) #2
LGTM with one comment. Nice catch!

https://codereview.appspot.com/86080043/diff/20001/cmd/jujud/agent_test.go
File cmd/jujud/agent_test.go (right):

https://codereview.appspot.com/86080043/diff/20001/cmd/jujud/agent_test.go#ne...
cmd/jujud/agent_test.go:286: addr, port, err := net.SplitHostPort(s)
How about:

nothing := instance.HostPort{}
then just return nothing, err on error.

IMO will read nicer.
Sign in to reply to this message.

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