You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
752 B
21 lines
752 B
package command
|
|
|
|
import (
|
|
"testing"
|
|
|
|
pluginworker "github.com/seaweedfs/seaweedfs/weed/plugin/worker"
|
|
"google.golang.org/grpc"
|
|
"google.golang.org/grpc/credentials/insecure"
|
|
)
|
|
|
|
func TestMiniDefaultPluginJobTypes(t *testing.T) {
|
|
dialOption := grpc.WithTransportCredentials(insecure.NewCredentials())
|
|
// defaultMiniPluginJobTypes is an explicit list: "vacuum,volume_balance,erasure_coding,admin_script"
|
|
handlers, err := buildPluginWorkerHandlers(defaultMiniPluginJobTypes, dialOption, int(pluginworker.DefaultMaxExecutionConcurrency), "")
|
|
if err != nil {
|
|
t.Fatalf("buildPluginWorkerHandlers(mini default) err = %v", err)
|
|
}
|
|
if len(handlers) != 4 {
|
|
t.Fatalf("expected mini default job types to include 4 handlers, got %d", len(handlers))
|
|
}
|
|
}
|