summaryrefslogtreecommitdiff
path: root/service/rpc
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-23 15:19:19 +0300
committerWolfy-J <[email protected]>2018-09-23 15:19:19 +0300
commitd32e3935fc49d8f020954aad2b14e367b8bc6eeb (patch)
treea5c65c34d068f5cff8a32c92a6937cfe7a215d00 /service/rpc
parent811d6815399348540061795bec2460d54e35cd47 (diff)
more coverage
Diffstat (limited to 'service/rpc')
-rw-r--r--service/rpc/config_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/service/rpc/config_test.go b/service/rpc/config_test.go
index e5742a4c..1db6a4e0 100644
--- a/service/rpc/config_test.go
+++ b/service/rpc/config_test.go
@@ -27,6 +27,13 @@ func Test_Config_Hydrate_Error(t *testing.T) {
assert.Error(t, c.Hydrate(cfg))
}
+func Test_Config_Hydrate_Error2(t *testing.T) {
+ cfg := &testCfg{`{"enable": true, "listen": "invalid"`}
+ c := &Config{}
+
+ assert.Error(t, c.Hydrate(cfg))
+}
+
func TestConfig_Listener(t *testing.T) {
cfg := &Config{Listen: "tcp://:18001"}
@@ -134,4 +141,4 @@ func Test_Config_Defaults(t *testing.T) {
c.InitDefaults()
assert.Equal(t, true, c.Enable)
assert.Equal(t, "tcp://127.0.0.1:6001", c.Listen)
-}
+} \ No newline at end of file