summaryrefslogtreecommitdiff
path: root/server_config_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-06 16:09:49 +0300
committerWolfy-J <[email protected]>2018-06-06 16:09:49 +0300
commitd12bb5dbf7c60d44daabba238a2b1283050fde70 (patch)
tree14886b98bcb3d788e03c3ff2bdad68b709389d3b /server_config_test.go
parent3d03d5a85d8aa8647157c9fb06f0575a85445fc3 (diff)
fixing tests
Diffstat (limited to 'server_config_test.go')
-rw-r--r--server_config_test.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/server_config_test.go b/server_config_test.go
index dfd311d6..42d2fec4 100644
--- a/server_config_test.go
+++ b/server_config_test.go
@@ -17,6 +17,8 @@ func Test_ServerConfig_PipeFactory(t *testing.T) {
cfg = &ServerConfig{Relay: "pipe"}
f, err = cfg.makeFactory()
+ assert.NoError(t, err)
+ assert.NotNil(t, f)
defer f.Close()
assert.NoError(t, err)
@@ -26,6 +28,8 @@ func Test_ServerConfig_PipeFactory(t *testing.T) {
func Test_ServerConfig_SocketFactory(t *testing.T) {
cfg := &ServerConfig{Relay: "tcp://:9111"}
f, err := cfg.makeFactory()
+ assert.NoError(t, err)
+ assert.NotNil(t, f)
defer f.Close()
assert.NoError(t, err)
@@ -33,16 +37,16 @@ func Test_ServerConfig_SocketFactory(t *testing.T) {
assert.Equal(t, "tcp", f.(*SocketFactory).ls.Addr().Network(), )
assert.Equal(t, "[::]:9111", f.(*SocketFactory).ls.Addr().String())
- cfg = &ServerConfig{Relay: "tcp://localhost:9111"}
+ cfg = &ServerConfig{Relay: "tcp://localhost:9112"}
f, err = cfg.makeFactory()
- assert.NotNil(t, f)
assert.NoError(t, err)
+ assert.NotNil(t, f)
defer f.Close()
assert.NoError(t, err)
assert.IsType(t, &SocketFactory{}, f)
assert.Equal(t, "tcp", f.(*SocketFactory).ls.Addr().Network())
- assert.Equal(t, "127.0.0.1:9111", f.(*SocketFactory).ls.Addr().String())
+ assert.Equal(t, "127.0.0.1:9112", f.(*SocketFactory).ls.Addr().String())
}
func Test_ServerConfig_UnixSocketFactory(t *testing.T) {