diff options
author | Wolfy-J <[email protected]> | 2018-06-06 16:09:49 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-06 16:09:49 +0300 |
commit | d12bb5dbf7c60d44daabba238a2b1283050fde70 (patch) | |
tree | 14886b98bcb3d788e03c3ff2bdad68b709389d3b /server_config_test.go | |
parent | 3d03d5a85d8aa8647157c9fb06f0575a85445fc3 (diff) |
fixing tests
Diffstat (limited to 'server_config_test.go')
-rw-r--r-- | server_config_test.go | 10 |
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) { |