summaryrefslogtreecommitdiff
path: root/internal/container/plugins_test.go
blob: da639f7d669818dbef029ff5fd49fd3359b2c4e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package container_test

import (
	"reflect"
	"testing"

	"github.com/spiral/roadrunner-binary/v2/internal/container"
)

func TestPlugins(t *testing.T) {
	for _, p := range container.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)
		}
	}
}