Commit f12fcc72 authored by Jacob Vosmaer's avatar Jacob Vosmaer

More tests for tcp:// URL's

parent 0b9148bf
...@@ -17,6 +17,9 @@ func TestParseAddress(t *testing.T) { ...@@ -17,6 +17,9 @@ func TestParseAddress(t *testing.T) {
{raw: "unix://foo/bar.socket", network: "unix", addr: "foo/bar.socket"}, {raw: "unix://foo/bar.socket", network: "unix", addr: "foo/bar.socket"},
{raw: "unix:foo/bar.socket", network: "unix", addr: "foo/bar.socket"}, {raw: "unix:foo/bar.socket", network: "unix", addr: "foo/bar.socket"},
{raw: "tcp://1.2.3.4", network: "tcp", addr: "1.2.3.4"}, {raw: "tcp://1.2.3.4", network: "tcp", addr: "1.2.3.4"},
{raw: "tcp://1.2.3.4:567", network: "tcp", addr: "1.2.3.4:567"},
{raw: "tcp://foobar", network: "tcp", addr: "foobar"},
{raw: "tcp://foobar:567", network: "tcp", addr: "foobar:567"},
{raw: "tcp://1.2.3.4/foo/bar.socket", invalid: true}, {raw: "tcp://1.2.3.4/foo/bar.socket", invalid: true},
{raw: "tcp:///foo/bar.socket", invalid: true}, {raw: "tcp:///foo/bar.socket", invalid: true},
{raw: "tcp:/foo/bar.socket", invalid: true}, {raw: "tcp:/foo/bar.socket", invalid: true},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment