summaryrefslogtreecommitdiff
path: root/plugins/metrics
diff options
context:
space:
mode:
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 {