moby--moby/internal/test/daemon
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
..
config.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
container.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
daemon.go Cleanup "address" when connecting over a UNIX socket 2019-08-19 18:55:14 +02:00
daemon_unix.go integration-cli: fix netns test cleanup 2018-11-01 13:23:47 -07:00
daemon_windows.go
node.go TestAPISwarmLeaderElection: add some debug 2018-11-01 13:24:39 -07:00
ops.go VXLAN UDP Port configuration support 2018-11-22 17:35:02 -05:00
plugin.go Completely remove `d.NewClient` from testing tools 2019-02-07 16:07:02 -08:00
secret.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
service.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
swarm.go Completely remove `d.NewClient` from testing tools 2019-02-07 16:07:02 -08:00