apiserver: fix LP 1466011 #2590

Merged
merged 2 commits into from Jun 18, 2015

Conversation

Projects
None yet
3 participants
Contributor

davecheney commented Jun 18, 2015

Fixes LP 1466011

http://reviews.vapour.ws/r/1928/ removed a bunch of string munging logic related to the reported address of the api server.

This change exposed an expectation by the apiserver test cases that the apiserver would always report it was listening on "localhost", even though the test suite never bound the socket to localhost in the first place. Fix this by explicitly binding to 127.0.0.1 as the test expects, and in the process remove a bunch of code in the api client which had grown to expect a set of 'special' addresses in the api.Info.Addrs slice.

As real clients always use the address specified in their jenv file, that is they never are asked to connect to "0.0.0.0" or "::" or "localhost", the behaviour of the test now better mirrors how the code is used.

apiserver: fix LP 1466011
Fixes LP 1466011

http://reviews.vapour.ws/r/1928/ removed a bunch of string munging logic related to the reported address of the api server.

This change exposed an expectation by the apiserver test cases that the apiserver would _always_ report it was listening on "localhost", even though the test suite never bound the socket to localhost in the first place. Fix this by explicitly binding to localhost as the test expects, and in the process remove a bunch of code in the api client which had grown to expect a set of 'special' addresses in the api.Info.Addrs slice.

As _real_ clients always use the address specified in their jenv file, that is they never are asked to connect to "0.0.0.0" or "::" or "localhost", the behaviour of the test now better mirrors how the code is used.
Owner

howbazaar commented Jun 18, 2015

ship it

Contributor

davecheney commented Jun 18, 2015

$$merge$$

Contributor

jujubot commented Jun 18, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jun 18, 2015

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/3701

Contributor

davecheney commented Jun 18, 2015

$$merge$$

Contributor

jujubot commented Jun 18, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Jun 18, 2015

Merge pull request #2590 from davecheney/fixedbugs/1466011
apiserver: fix LP 1466011

Fixes LP 1466011

http://reviews.vapour.ws/r/1928/ removed a bunch of string munging logic related to the reported address of the api server.

This change exposed an expectation by the apiserver test cases that the apiserver would _always_ report it was listening on "localhost", even though the test suite never bound the socket to localhost in the first place. Fix this by explicitly binding to 127.0.0.1 as the test expects, and in the process remove a bunch of code in the api client which had grown to expect a set of 'special' addresses in the api.Info.Addrs slice.

As _real_ clients always use the address specified in their jenv file, that is they never are asked to connect to "0.0.0.0" or "::" or "localhost", the behaviour of the test now better mirrors how the code is used.

@jujubot jujubot merged commit 8820cba into juju:master Jun 18, 2015

@davecheney davecheney deleted the davecheney:fixedbugs/1466011 branch Jun 18, 2015

@davecheney davecheney restored the davecheney:fixedbugs/1466011 branch Sep 4, 2015

@davecheney davecheney deleted the davecheney:fixedbugs/1466011 branch Apr 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment