client: TestSetHostHeader: don't use un-keyed literals

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2a59188760)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-14 18:56:47 +02:00
parent d5591a4e5f
commit 65468a2bef
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -28,24 +28,24 @@ func TestSetHostHeader(t *testing.T) {
expectedURLHost string expectedURLHost string
}{ }{
{ {
"unix:///var/run/docker.sock", host: "unix:///var/run/docker.sock",
"docker", expectedHost: "docker",
"/var/run/docker.sock", expectedURLHost: "/var/run/docker.sock",
}, },
{ {
"npipe:////./pipe/docker_engine", host: "npipe:////./pipe/docker_engine",
"docker", expectedHost: "docker",
"//./pipe/docker_engine", expectedURLHost: "//./pipe/docker_engine",
}, },
{ {
"tcp://0.0.0.0:4243", host: "tcp://0.0.0.0:4243",
"", expectedHost: "",
"0.0.0.0:4243", expectedURLHost: "0.0.0.0:4243",
}, },
{ {
"tcp://localhost:4243", host: "tcp://localhost:4243",
"", expectedHost: "",
"localhost:4243", expectedURLHost: "localhost:4243",
}, },
} }