summaryrefslogtreecommitdiff
path: root/service/rpc/service_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-04 00:09:12 +0300
committerGitHub <[email protected]>2019-05-04 00:09:12 +0300
commit727602f9d6e3b5a92f6fa0d7a497ab1ef358a349 (patch)
treeec41356d3e421284f44d8c82f3b297e5c8ab2c7a /service/rpc/service_test.go
parentf4515e276179d77e3f9457ba0d99545081ae50ea (diff)
parent8a2f79a622e9b3b6e20718a257bfdaaf8dbb8747 (diff)
Merge pull request #144 from spiral/feature/updates
WIP: 1.4.0
Diffstat (limited to 'service/rpc/service_test.go')
-rw-r--r--service/rpc/service_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/service/rpc/service_test.go b/service/rpc/service_test.go
index 0278d287..ee87509a 100644
--- a/service/rpc/service_test.go
+++ b/service/rpc/service_test.go
@@ -1,6 +1,7 @@
package rpc
import (
+ "github.com/spiral/roadrunner/service"
"github.com/spiral/roadrunner/service/env"
"github.com/stretchr/testify/assert"
"testing"
@@ -13,7 +14,7 @@ func (ts *testService) Echo(msg string, r *string) error { *r = msg; return nil
func Test_Disabled(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: false}, nil)
+ ok, err := s.Init(&Config{Enable: false}, service.NewContainer(nil), nil)
assert.NoError(t, err)
assert.False(t, ok)
@@ -31,7 +32,7 @@ func Test_RegisterNotConfigured(t *testing.T) {
func Test_Enabled(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"}, nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"}, service.NewContainer(nil), nil)
assert.NoError(t, err)
assert.True(t, ok)
@@ -39,7 +40,7 @@ func Test_Enabled(t *testing.T) {
func Test_StopNonServing(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"}, nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"}, service.NewContainer(nil), nil)
assert.NoError(t, err)
assert.True(t, ok)
@@ -48,7 +49,7 @@ func Test_StopNonServing(t *testing.T) {
func Test_Serve_Errors(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "mailformed"}, nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "mailformed"}, service.NewContainer(nil), nil)
assert.NoError(t, err)
assert.True(t, ok)
@@ -61,7 +62,7 @@ func Test_Serve_Errors(t *testing.T) {
func Test_Serve_Client(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9018"}, nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9018"}, service.NewContainer(nil), nil)
assert.NoError(t, err)
assert.True(t, ok)
@@ -85,7 +86,7 @@ func Test_Serve_Client(t *testing.T) {
func TestSetEnv(t *testing.T) {
s := &Service{}
e := env.NewService(map[string]string{})
- ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9018"}, e)
+ ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9018"}, service.NewContainer(nil), e)
assert.NoError(t, err)
assert.True(t, ok)