diff options
author | Wolfy-J <[email protected]> | 2018-07-09 09:58:56 -0700 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-07-09 09:58:56 -0700 |
commit | 07e407e71bbc754fe1bc6dcff38cc0970509216d (patch) | |
tree | 5896ff5b2c05833a109b458572a5058a9ee4152f /service | |
parent | 21bd058003a159ff307565d5b57e3631921a7a96 (diff) |
more tests
Diffstat (limited to 'service')
-rw-r--r-- | service/container_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/service/container_test.go b/service/container_test.go index 8cb97c74..efccc182 100644 --- a/service/container_test.go +++ b/service/container_test.go @@ -429,3 +429,13 @@ func TestContainer_InitDependencyFail(t *testing.T) { assert.Error(t, c.Init(&testCfg{`{"test":"something", "test2":{"v":"fail"}}`})) } + +func TestContainer_InitDependencyEmpty(t *testing.T) { + logger, _ := test.NewNullLogger() + logger.SetLevel(logrus.DebugLevel) + + c := NewContainer(logger) + c.Register("test2", &testInitD{}) + + assert.Contains(t, c.Init(&testCfg{`{"test2":{"v":"ok"}}`}).Error(), "testInitC") +} |