diff options
author | Wolfy-J <[email protected]> | 2018-06-13 14:07:05 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-13 14:07:05 +0300 |
commit | ca95f67317bcf8972b9e669869338a7dc09bf06d (patch) | |
tree | 4d199ceb8a78675242fef21bd87efb5a78b04029 /service/rpc/service_test.go | |
parent | c8e8afe79611941ce50453ee7dfae82d7915e9c4 (diff) |
more upload tests
Diffstat (limited to 'service/rpc/service_test.go')
-rw-r--r-- | service/rpc/service_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/service/rpc/service_test.go b/service/rpc/service_test.go index f6aeb2aa..ce85d52f 100644 --- a/service/rpc/service_test.go +++ b/service/rpc/service_test.go @@ -19,7 +19,7 @@ func (cfg *testCfg) Unmarshal(out interface{}) error { return json.Unmarshal([]b func Test_ConfigError(t *testing.T) { s := &Service{} - ok, err := s.Configure(&testCfg{`{"enable":false`}, nil) + ok, err := s.Init(&testCfg{`{"enable":false`}, nil) assert.Error(t, err) assert.False(t, ok) @@ -27,7 +27,7 @@ func Test_ConfigError(t *testing.T) { func Test_Disabled(t *testing.T) { s := &Service{} - ok, err := s.Configure(&testCfg{`{"enable":false}`}, nil) + ok, err := s.Init(&testCfg{`{"enable":false}`}, nil) assert.NoError(t, err) assert.False(t, ok) @@ -45,7 +45,7 @@ func Test_RegisterNotConfigured(t *testing.T) { func Test_Enabled(t *testing.T) { s := &Service{} - ok, err := s.Configure(&testCfg{`{"enable":true, "listen":"tcp://localhost:9008"}`}, nil) + ok, err := s.Init(&testCfg{`{"enable":true, "listen":"tcp://localhost:9008"}`}, nil) assert.NoError(t, err) assert.True(t, ok) @@ -53,7 +53,7 @@ func Test_Enabled(t *testing.T) { func Test_StopNonServing(t *testing.T) { s := &Service{} - ok, err := s.Configure(&testCfg{`{"enable":true, "listen":"tcp://localhost:9008"}`}, nil) + ok, err := s.Init(&testCfg{`{"enable":true, "listen":"tcp://localhost:9008"}`}, nil) assert.NoError(t, err) assert.True(t, ok) @@ -62,7 +62,7 @@ func Test_StopNonServing(t *testing.T) { func Test_Serve_Errors(t *testing.T) { s := &Service{} - ok, err := s.Configure(&testCfg{`{"enable":true, "listen":"mailformed"}`}, nil) + ok, err := s.Init(&testCfg{`{"enable":true, "listen":"mailformed"}`}, nil) assert.NoError(t, err) assert.True(t, ok) @@ -75,7 +75,7 @@ func Test_Serve_Errors(t *testing.T) { func Test_Serve_Client(t *testing.T) { s := &Service{} - ok, err := s.Configure(&testCfg{`{"enable":true, "listen":"tcp://localhost:9018"}`}, nil) + ok, err := s.Init(&testCfg{`{"enable":true, "listen":"tcp://localhost:9018"}`}, nil) assert.NoError(t, err) assert.True(t, ok) |