|
|
|
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
Total messages: 2
|
rog
Please take a look.
|
11 years, 9 months ago (2014年04月09日 15:21:58 UTC) #1 | |||||||||||||||||||||||||||||
Please take a look.
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.