package o11y

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func TestInternalReadBizType(t *testing.T) {
	tests := []struct {
		env        string
		deployType string
		want       string
	}{
		{env: "staging", deployType: PremiumType, want: "staging-tidbcloud-nextgen"},
		{env: "dev", deployType: NgHostType, want: "dev-tidbcloud-nextgen"},
		{env: "prod", deployType: ByocType, want: "byoc"},
		{env: "staging", deployType: ByocHostType, want: "byoc"},
		{env: "prod", deployType: DedicatedType, want: "tidbcloud"},
		{env: "staging", deployType: SharedType, want: "staging-tidbcloud"},
	}

	for _, tt := range tests {
		require.Equal(t, tt.want, InternalReadBizType(tt.env, tt.deployType))
	}
}
