diff options
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() +} |