summaryrefslogtreecommitdiff
path: root/service/container_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-11-03 18:33:41 +0300
committerWolfy-J <[email protected]>2019-11-03 18:33:41 +0300
commitfbf5e2e677b7c1f89114a29acdd834536316ab73 (patch)
tree9144467b4c0e3982ae23210b569226f65080c16c /service/container_test.go
parentb4b1d63e02895e241447b75bbe7f755191c47227 (diff)
- the ability to set custom command producer for roadrunner
- minor improvements in metrics service - List() function for Container to receive names of all available services
Diffstat (limited to 'service/container_test.go')
-rw-r--r--service/container_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/service/container_test.go b/service/container_test.go
index 8fcaede2..4628986a 100644
--- a/service/container_test.go
+++ b/service/container_test.go
@@ -129,6 +129,20 @@ func TestContainer_Has(t *testing.T) {
assert.False(t, c.Has("another"))
}
+func TestContainer_List(t *testing.T) {
+ logger, hook := test.NewNullLogger()
+ logger.SetLevel(logrus.DebugLevel)
+
+ c := NewContainer(logger)
+ c.Register("test", &testService{})
+
+ assert.Equal(t, 0, len(hook.Entries))
+ assert.Equal(t, 1, len(c.List()))
+
+ assert.True(t, c.Has("test"))
+ assert.False(t, c.Has("another"))
+}
+
func TestContainer_Get(t *testing.T) {
logger, hook := test.NewNullLogger()
logger.SetLevel(logrus.DebugLevel)