From 6f70e31df4a88b85e576789ebe4fee6b5fc12d86 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Mon, 10 Sep 2018 14:52:56 +0300 Subject: minor config improvements --- service/http/config.go | 6 +++--- service/http/service_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'service/http') diff --git a/service/http/config.go b/service/http/config.go index 2cfe1ba2..5be42ae6 100644 --- a/service/http/config.go +++ b/service/http/config.go @@ -35,13 +35,13 @@ func (c *Config) Hydrate(cfg service.Config) error { return nil } - c.Workers.SetDefaults() - c.Workers.UpscaleDurations() - if err := c.Valid(); err != nil { return err } + c.Workers.SetDefaults() + c.Workers.UpscaleDurations() + return nil } diff --git a/service/http/service_test.go b/service/http/service_test.go index 9a5a3a9b..8dab7cd4 100644 --- a/service/http/service_test.go +++ b/service/http/service_test.go @@ -49,7 +49,7 @@ func Test_Service_NoConfig(t *testing.T) { c := service.NewContainer(logger) c.Register(ID, &Service{}) - assert.Error(t, c.Init(&testCfg{httpCfg: `{}`})) + assert.Error(t, c.Init(&testCfg{httpCfg: `{"Enable":true}`})) s, st := c.Get(ID) assert.NotNil(t, s) -- cgit v1.2.3