support booting PDS on a random port in testing (#193)
This patch makes PDS boot on a random port in the integration tests.
It's a first step towards #165 ("Integration tests need randomly
assigned ports") and request for feedback on its strategy before I apply
it to BDS.
To do this work, we have to teach `pds.Server` how to boot with an
existing net.Listener and teach its Echo instance to do the same. That
required using `Echo#StartServer` instead of `Echo#Start`. Using
`Echo#StartServer` seems to be the accepted pattern for booting from an
existing Listener in Echo and both it and `Start` call the same
`Echo#configureServer` under the hood.
PDS isn't a production service right now, but I believe I've reproduced
the
configuration that echo would have done that there wouldn't be
production
impact. However, if BGS is, we could talk about what feature flagging
we'd
like to prevent problems when this is applied there.
Along the way, we refactor the uses of the `TestPDS.host` field into
more explicit methods on `TestPDS`. I'm not completely sold on those
methods' names, but they seem handy.
Updates #165
authored by Whyrusleeping and committed by GitHub a3118b4f 57a9f2e3