summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2022-01-19 09:48:50 +0300
committerValery Piashchynski <[email protected]>2022-01-19 09:48:50 +0300
commit1b451b0e9e3c6970ee1ed5aec94ee0ffcf008f4e (patch)
treede6f408173dcc82837aebe4062980ed47fbe1aaa /internal
parent37a9130e5cf7be4f8ddf7aa3c71d24cd2c937b3c (diff)
Update Dockerfile, add plugins_test
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal')
-rw-r--r--internal/container/plugins.go4
-rw-r--r--internal/container/plugins_test.go18
2 files changed, 20 insertions, 2 deletions
diff --git a/internal/container/plugins.go b/internal/container/plugins.go
index 7cbead2b..fe775f04 100644
--- a/internal/container/plugins.go
+++ b/internal/container/plugins.go
@@ -33,7 +33,7 @@ import (
"github.com/roadrunner-server/kv/v2"
"github.com/roadrunner-server/memcached/v2"
"github.com/roadrunner-server/tcp/v2"
- roadrunner_temporal "github.com/temporalio/roadrunner-temporal"
+ rrt "github.com/temporalio/roadrunner-temporal"
)
// Plugins returns active plugins for the endure container. Feel free to add or remove any plugins.
@@ -101,6 +101,6 @@ func Plugins() []interface{} { //nolint:funlen
&tcp.Plugin{},
// temporal plugins
- &roadrunner_temporal.Plugin{},
+ &rrt.Plugin{},
}
}
diff --git a/internal/container/plugins_test.go b/internal/container/plugins_test.go
new file mode 100644
index 00000000..b857f09a
--- /dev/null
+++ b/internal/container/plugins_test.go
@@ -0,0 +1,18 @@
+package container
+
+import (
+ "reflect"
+ "testing"
+)
+
+func TestPlugins(t *testing.T) {
+ for _, p := range Plugins() {
+ if p == nil {
+ t.Error("plugin cannot be nil")
+ }
+
+ if pk := reflect.TypeOf(p).Kind(); pk != reflect.Ptr && pk != reflect.Struct {
+ t.Errorf("plugin %v must be a structure or pointer to the structure", p)
+ }
+ }
+}