summaryrefslogtreecommitdiff
path: root/server_config_test.go
diff options
context:
space:
mode:
authorAnton Titov <[email protected]>2019-12-23 14:52:06 +0300
committerGitHub <[email protected]>2019-12-23 14:52:06 +0300
commit921e1f55e23ab75b8250045916c8d1ffad1b8bde (patch)
tree00b16331b9ff3b3b846ba22989dddde721cc959d /server_config_test.go
parent921354df1aa4687837e3ba6ac0eb04d39321c149 (diff)
parent2093cb9058f94668fff0a97beb76b0cab66c7b63 (diff)
Merge branch 'master' into Fix_warning_and_issues
Diffstat (limited to 'server_config_test.go')
-rw-r--r--server_config_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/server_config_test.go b/server_config_test.go
index e408bde1..4f26d6ab 100644
--- a/server_config_test.go
+++ b/server_config_test.go
@@ -31,23 +31,24 @@ func Test_ServerConfig_PipeFactory(t *testing.T) {
func Test_ServerConfig_SocketFactory(t *testing.T) {
cfg := &ServerConfig{Relay: "tcp://:9111"}
- f, err := cfg.makeFactory()
+ f1, err := cfg.makeFactory()
assert.NoError(t, err)
- assert.NotNil(t, f)
+ assert.NotNil(t, f1)
defer func() {
- err := f.Close()
+ err := f1.Close()
+
if err != nil {
t.Errorf("error closing factory or underlying connections: error %v", err)
}
}()
assert.NoError(t, err)
- assert.IsType(t, &SocketFactory{}, f)
- assert.Equal(t, "tcp", f.(*SocketFactory).ls.Addr().Network())
- assert.Equal(t, "[::]:9111", f.(*SocketFactory).ls.Addr().String())
+ assert.IsType(t, &SocketFactory{}, f1)
+ assert.Equal(t, "tcp", f1.(*SocketFactory).ls.Addr().Network())
+ assert.Equal(t, "[::]:9111", f1.(*SocketFactory).ls.Addr().String())
cfg = &ServerConfig{Relay: "tcp://localhost:9112"}
- f, err = cfg.makeFactory()
+ f, err := cfg.makeFactory()
assert.NoError(t, err)
assert.NotNil(t, f)
defer func() {