summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")
+}