summaryrefslogtreecommitdiff
path: root/service/container_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-07-09 09:58:56 -0700
committerWolfy-J <[email protected]>2018-07-09 09:58:56 -0700
commit07e407e71bbc754fe1bc6dcff38cc0970509216d (patch)
tree5896ff5b2c05833a109b458572a5058a9ee4152f /service/container_test.go
parent21bd058003a159ff307565d5b57e3631921a7a96 (diff)
more tests
Diffstat (limited to 'service/container_test.go')
-rw-r--r--service/container_test.go10
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")
+}