From d32e3935fc49d8f020954aad2b14e367b8bc6eeb Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 23 Sep 2018 15:19:19 +0300 Subject: more coverage --- service/rpc/config_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'service/rpc/config_test.go') 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 -- cgit v1.2.3