summaryrefslogtreecommitdiff
path: root/tests/plugins/server
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/server')
-rw-r--r--tests/plugins/server/configs/.rr.yaml2
-rw-r--r--tests/plugins/server/plugin_pipes.go2
-rw-r--r--tests/plugins/server/server_plugin_test.go21
3 files changed, 8 insertions, 17 deletions
diff --git a/tests/plugins/server/configs/.rr.yaml b/tests/plugins/server/configs/.rr.yaml
index d28265d5..a1484c02 100644
--- a/tests/plugins/server/configs/.rr.yaml
+++ b/tests/plugins/server/configs/.rr.yaml
@@ -9,4 +9,4 @@ server:
relay_timeout: "20s"
logs:
mode: development
- level: error
+ level: info
diff --git a/tests/plugins/server/plugin_pipes.go b/tests/plugins/server/plugin_pipes.go
index af34b4d3..f1c13734 100644
--- a/tests/plugins/server/plugin_pipes.go
+++ b/tests/plugins/server/plugin_pipes.go
@@ -67,7 +67,7 @@ func (f *Foo) Serve() chan error {
return errCh
}
if cmd == nil {
- errCh <- errors.E(op, "command is nil")
+ errCh <- errors.E(op, errors.Str("command is nil"))
return errCh
}
diff --git a/tests/plugins/server/server_plugin_test.go b/tests/plugins/server/server_plugin_test.go
index c0c3c993..06c9eb50 100644
--- a/tests/plugins/server/server_plugin_test.go
+++ b/tests/plugins/server/server_plugin_test.go
@@ -23,22 +23,13 @@ func TestAppPipes(t *testing.T) {
vp := &config.Viper{}
vp.Path = "configs/.rr.yaml"
vp.Prefix = "rr"
- err = container.Register(vp)
- if err != nil {
- t.Fatal(err)
- }
-
- err = container.Register(&server.Plugin{})
- if err != nil {
- t.Fatal(err)
- }
- err = container.Register(&Foo{})
- if err != nil {
- t.Fatal(err)
- }
-
- err = container.Register(&logger.ZapLogger{})
+ err = container.RegisterAll(
+ vp,
+ &server.Plugin{},
+ &Foo{},
+ &logger.ZapLogger{},
+ )
if err != nil {
t.Fatal(err)
}