summaryrefslogtreecommitdiff
path: root/plugins/metrics
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-18 10:37:44 +0300
committerValery Piashchynski <[email protected]>2020-11-18 10:37:44 +0300
commitbe18313f6bf8f903f2d2ba3ca812ad8546c329f6 (patch)
tree0a6d7382a526a59a034f85d60b3f2b24e103ffcd /plugins/metrics
parent6236aac37bd1661b20400689f66d1e92283c5111 (diff)
Informer plugin ready
Diffstat (limited to 'plugins/metrics')
-rw-r--r--plugins/metrics/tests/metrics_test.go31
1 files changed, 8 insertions, 23 deletions
diff --git a/plugins/metrics/tests/metrics_test.go b/plugins/metrics/tests/metrics_test.go
index ed5d085a..1d0796b3 100644
--- a/plugins/metrics/tests/metrics_test.go
+++ b/plugins/metrics/tests/metrics_test.go
@@ -54,29 +54,14 @@ func TestMetricsInit(t *testing.T) {
cfg.Prefix = "rr"
cfg.Path = ".rr-test.yaml"
- err = cont.Register(cfg)
- if err != nil {
- t.Fatal(err)
- }
-
- err = cont.Register(&metrics.Plugin{})
- if err != nil {
- t.Fatal(err)
- }
-
- err = cont.Register(&rpcPlugin.Plugin{})
- if err != nil {
- t.Fatal(err)
- }
-
- err = cont.Register(&logger.ZapLogger{})
- if err != nil {
- t.Fatal(err)
- }
- err = cont.Register(&Plugin1{})
- if err != nil {
- t.Fatal(err)
- }
+ err = cont.RegisterAll(
+ cfg,
+ &metrics.Plugin{},
+ &rpcPlugin.Plugin{},
+ &logger.ZapLogger{},
+ &Plugin1{},
+ )
+ assert.NoError(t, err)
err = cont.Init()
if err != nil {