diff options
author | Valery Piashchynski <[email protected]> | 2022-01-19 10:21:55 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-19 10:21:55 +0300 |
commit | b49a0b183b234efcbd5e58bea5433439ab037a84 (patch) | |
tree | de6f408173dcc82837aebe4062980ed47fbe1aaa /internal/container | |
parent | bd934bb4dcdcb65e183ad642de3071a712fd618b (diff) | |
parent | 1b451b0e9e3c6970ee1ed5aec94ee0ffcf008f4e (diff) |
[#944]: release: `v2.7.3`v2.7.3
Diffstat (limited to 'internal/container')
-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) + } + } +} |