MCPcopy Create free account
hub / github.com/nginx-proxy/docker-gen / assertParseHostError

Function assertParseHostError

internal/dockerclient/docker_cli_test.go:199–205  ·  view source on GitHub ↗
(t *testing.T, address string)

Source from the content-addressed store, hash-verified

197}
198
199func assertParseHostError(t *testing.T, address string) {
200 proto, addr, err := parseHost(address)
201 message := fmt.Sprintf("should have failed to parse %v", address)
202 assert.Error(t, err, message)
203 assert.Equal(t, "", proto, message)
204 assert.Equal(t, "", addr, message)
205}
206
207func TestParseHostTCPNoAddressError(t *testing.T) {
208 assertParseHostError(t, "tcp://")

Calls 1

parseHostFunction · 0.85

Tested by

no test coverage detected