diff options
author | Valery Piashchynski <[email protected]> | 2022-01-19 09:48:50 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2022-01-19 09:48:50 +0300 |
commit | 1b451b0e9e3c6970ee1ed5aec94ee0ffcf008f4e (patch) | |
tree | de6f408173dcc82837aebe4062980ed47fbe1aaa /internal | |
parent | 37a9130e5cf7be4f8ddf7aa3c71d24cd2c937b3c (diff) |
Update Dockerfile, add plugins_test
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/container/plugins.go | 4 | ||||
-rw-r--r-- | internal/container/plugins_test.go | 18 |
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) + } + } +} |