//go:build unit || all
// +build unit all

package dm

import (
	"testing"

	"github.com/onsi/gomega"

	"github.com/tidbcloud/infra-provider/pkg/config"
)

func TestGetDMMaxConcurrentReconciles(t *testing.T) {
	g := gomega.NewWithT(t)
	cfg := config.RootConfig{
		ControllerConfig: config.ControllerConfig{
			MaxConcurrentReconciles: map[string]int{
				"dm":     10,
				"dm-job": 3,
			},
		},
	}

	g.Expect(getDMMaxConcurrentReconciles(cfg)).To(gomega.Equal(10))
}
