moby--moby/internal/test
Sebastiaan van Stijn 130c0746c1
Cleanup "address" when connecting over a UNIX socket
When connecting with the daemon using a UNIX socket, the HTTP hostname was set, based
on the socket location, which was generating some noise in the test-logs.

Given that the actual hostname is not important (the URL just has to be well-formed),
the hostname/address can be cleaned up to reduce the noise.

This patch strips the path from the `addr`, and keeps `<random-id>.sock` as address.

Before:

    daemon.go:329: [d15d31ba75501] error pinging daemon on start: Get http://%2Ftmp%2Fdocker-integration%2Fd15d31ba75501.sock/_ping: dial unix /tmp/docker-integration/d15d31ba75501.sock: connect: no such file or directory

After:

    daemon.go:329: [d15d31ba75501] error pinging daemon on start: Get http://d15d31ba75501.sock/_ping: dial unix /tmp/docker-integration/d15d31ba75501.sock: connect: no such file or directory

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 92e6e7dd5f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:14 +02:00
..
daemon Cleanup "address" when connecting over a UNIX socket 2019-08-19 18:55:14 +02:00
environment Consider WINDOWS_BASE_IMAGE_TAG override when setting Windows base image for tests 2019-05-21 17:00:07 +02:00
fakecontext Make testing helpers as such… 2018-04-20 10:38:43 +02:00
fakegit Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
fakestorage Fix some minor wording / issues 2019-01-07 13:57:01 +01:00
fixtures Remove the rest of v1 manifest support 2019-03-02 10:46:37 -08:00
registry Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
request client: define "Opt" type 2019-04-10 01:23:45 +02:00
helper.go Make testing helpers as such… 2018-04-20 10:38:43 +02:00