summaryrefslogtreecommitdiff
path: root/utils/network_windows_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/network_windows_test.go')
-rwxr-xr-xutils/network_windows_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/network_windows_test.go b/utils/network_windows_test.go
new file mode 100755
index 00000000..277dc970
--- /dev/null
+++ b/utils/network_windows_test.go
@@ -0,0 +1,16 @@
+// +build windows
+
+package utils
+
+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)")
+}