diff options
author | Valery Piashchynski <[email protected]> | 2020-02-26 18:12:40 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-26 18:12:40 +0300 |
commit | 53859e193b89082c83d7a190baa97892075d259c (patch) | |
tree | 7791c8bf6f4d17f349f267c44ffb130edc9cf2b3 /util | |
parent | 038517ca5e4e8d53614ca406fd2edda306a58875 (diff) |
Test update
Ci remove windows
Diffstat (limited to 'util')
-rw-r--r-- | util/network_test.go | 7 | ||||
-rw-r--r-- | util/network_windows_test.go | 16 |
2 files changed, 18 insertions, 5 deletions
diff --git a/util/network_test.go b/util/network_test.go index 830e1b8a..09157ec0 100644 --- a/util/network_test.go +++ b/util/network_test.go @@ -1,8 +1,9 @@ +// +build linux darwin freebsd + package util import ( "github.com/stretchr/testify/assert" - "runtime" "testing" ) @@ -15,10 +16,6 @@ func TestCreateListener(t *testing.T) { } 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() diff --git a/util/network_windows_test.go b/util/network_windows_test.go new file mode 100644 index 00000000..a5a8064e --- /dev/null +++ b/util/network_windows_test.go @@ -0,0 +1,16 @@ +// +build windows + +package util + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestCreateListener(t *testing.T) { + _, err := CreateListener("unexpected dsn") + assert.Error(t, err, "Invalid DSN (tcp://:6001, unix://file.sock)") + + _, err = CreateListener("aaa://192.168.0.1") + assert.Error(t, err, "Invalid Protocol (tcp://:6001, unix://file.sock)") +}
\ No newline at end of file |