diff options
Diffstat (limited to 'service/container_test.go')
-rw-r--r-- | service/container_test.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/service/container_test.go b/service/container_test.go index 4628986a..ad4c1e64 100644 --- a/service/container_test.go +++ b/service/container_test.go @@ -67,7 +67,10 @@ type testCfg struct{ cfg string } func (cfg *testCfg) Get(name string) Config { vars := make(map[string]interface{}) - json.Unmarshal([]byte(cfg.cfg), &vars) + err := json.Unmarshal([]byte(cfg.cfg), &vars) + if err != nil { + panic("error unmarshalling the cfg.cfg value") + } v, ok := vars[name] if !ok { @@ -439,6 +442,10 @@ func TestContainer_InitErrorB(t *testing.T) { type testInitC struct{} +func (r *testInitC) Test() bool { + return true +} + func TestContainer_NoInit(t *testing.T) { logger, _ := test.NewNullLogger() logger.SetLevel(logrus.DebugLevel) @@ -462,7 +469,6 @@ func (c *DCfg) Hydrate(cfg Config) error { if err := cfg.Unmarshal(c); err != nil { return err } - if c.V == "fail" { return errors.New("failed config") } |