diff options
author | Wolfy-J <[email protected]> | 2019-06-24 14:05:45 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-06-24 14:05:45 +0300 |
commit | d5b8235cbe7e7e1f48b788accbc39d54c0977aa5 (patch) | |
tree | c55b18f2d128d3059df5fe636beea55a4fbbcafc /util | |
parent | c1503fa363d64664988a01e3dbf3e116687df973 (diff) |
more tests
Diffstat (limited to 'util')
-rw-r--r-- | util/network_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/util/network_test.go b/util/network_test.go index cfa06778..830e1b8a 100644 --- a/util/network_test.go +++ b/util/network_test.go @@ -2,6 +2,7 @@ package util import ( "github.com/stretchr/testify/assert" + "runtime" "testing" ) @@ -12,3 +13,13 @@ func TestCreateListener(t *testing.T) { _, err = CreateListener("aaa://192.168.0.1") assert.Error(t, err, "Invalid Protocol (tcp://:6001, unix://file.sock)") } + +func TestUnixCreateListener(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("not supported on " + runtime.GOOS) + } + + l, err := CreateListener("unix://file.sock") + assert.NoError(t, err) + l.Close() +} |