From 1f079d9b681e65a412fb8b79f013862ff8f1c7db Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 23 Sep 2018 15:12:19 +0300 Subject: more coverage --- service/env/config_test.go | 6 ++++++ service/rpc/config_test.go | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/service/env/config_test.go b/service/env/config_test.go index 3ae2afbc..50fbdaa5 100644 --- a/service/env/config_test.go +++ b/service/env/config_test.go @@ -27,3 +27,9 @@ func Test_Config_Hydrate_Empty(t *testing.T) { assert.NoError(t, c.Hydrate(cfg)) assert.Len(t, c.Values, 0) } + +func Test_Config_Defaults(t *testing.T) { + c := &Config{} + c.InitDefaults() + assert.Len(t, c.Values, 0) +} diff --git a/service/rpc/config_test.go b/service/rpc/config_test.go index a7c51c0f..e5742a4c 100644 --- a/service/rpc/config_test.go +++ b/service/rpc/config_test.go @@ -128,3 +128,10 @@ func Test_Config_DialerErrorMethod(t *testing.T) { assert.Nil(t, ln) assert.Error(t, err) } + +func Test_Config_Defaults(t *testing.T) { + c := &Config{} + c.InitDefaults() + assert.Equal(t, true, c.Enable) + assert.Equal(t, "tcp://127.0.0.1:6001", c.Listen) +} -- cgit v1.2.3