You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: service_test.go
    path of file: ./repos/grafana/pkg/login/social/socialimpl
    
    the code of the file until where you have to start completion: package socialimpl

import (
	"testing"

	"github.com/stretchr/testify/require"
	"gopkg.in/ini.v1"

	"github.com/grafana/grafana/pkg/api/routing"
	"github.com/grafana/grafana/pkg/infra/db"
	"github.com/grafana/grafana/pkg/infra/remotecache"
	"github.com/grafana/grafana/pkg/infra/usagestats"
	"github.com/grafana/grafana/pkg/login/social"
	"github.com/grafana/grafana/pkg/login/social/connectors"
	"github.com/grafana/grafana/pkg/services/accesscontrol/acimpl"
	"github.com/grafana/grafana/pkg/services/featuremgmt"
	secretsfake "github.com/grafana/grafana/pkg/services/secrets/fakes"
	"github.com/grafana/grafana/pkg/services/ssosettings/ssosettingsimpl"
	"github.com/grafana/grafana/pkg/services/supportbundles/supportbundlestest"
	"github.com/grafana/grafana/pkg/setting"
	"github.com/grafana/grafana/pkg/tests/testsuite"
)

func TestMain(m *testing.M) {
	testsuite.Run(m)
}

func TestSocialService_ProvideService(t *testing.T) {
	type testEnv struct {
		features featuremgmt.FeatureToggles
	}
	testCases := []struct {
		name                                string
		setup                               func(t *testing.T, env *testEnv)
		expectedSocialMapLength             int
		expectedGenericOAuthSkipOrgRoleSync bool
	}{
		{
			name:                                "should load only enabled social connectors when ssoSettingsApi is disabled",
			setup:                               nil,
			expectedSocialMapLength:             1,
			expectedGenericOAuthSkipOrgRoleSync: false,
		},
		{
			name: "should load all social connectors when ssoSettingsApi is enabled",
			setup: func(t *testing.T, env *testEnv) {
				env.features = featuremgmt.WithFeatures(featuremgmt.FlagSsoSettingsApi)
			},
			expectedSocialMapLength:             7,
			expectedGenericOAuthSkipOrgRoleSync: false,
		},
	}
	iniContent := `
	[auth.azuread]
	enabled = true
	skip_org_role_sync = true

	[auth.generic_oauth]
	enabled = false
	skip_org_role_sync = false
	`
	iniFile, err := ini.Load([]byte(iniContent))
	require.NoError(t, err)

	cfg := setting.NewCfg()
	cfg.Raw = iniFile

	secrets := secretsfake.NewMockService(t)
	accessControl := acimpl.ProvideAccessControl(cfg)
	sqlStore := db.InitTestDB(t)

	ssoSettingsSvc := ssosettingsimpl.ProvideService(cfg, sqlStore, accessControl, routing.NewRouteRegister(), featuremgmt.WithFeatures(), secrets, &usagestats.UsageStatsMock{}, nil)

	for _, tc := range testCases {
		t.Run(tc.name, func(t *tes
    
func TestSocialService_ProvideService_GrafanaComGrafanaNet(t *testing.T) {
	testCases := []struct {
		name                        string
		rawIniContent               string
		expectedGrafanaComOAuthInfo *social.OAuthInfo
	}{
		{
			name: "should setup the connector using auth.grafana_com section if it is enabled",
			rawIniContent: `
			[auth.grafana_com]
			enabled = true
			client_id = grafanaComClientId
			
			[auth.grafananet]
			enabled = false
			client_id = grafanaNetClientId`,
			expectedGrafanaComOAuthInfo: &social.OAuthInfo{
				AuthStyle: "inheader",
				AuthUrl:   "/oauth2/authorize",
				TokenUrl:  "/api/oauth2/token",
				Enabled:   true,
				ClientId:  "grafanaComClientId",
			},
		},
		{
			name: "should setup the connector using auth.grafananet section if it is enabled",
			rawIniContent: `
			[auth.grafana_com]
			enabled = false
			client_id = grafanaComClientId
			
			[auth.grafananet]
			enabled = true
			client_id = grafanaNetClientId`,
			expectedGrafanaComOAuthInfo: &social.OAuthInfo{
				AuthStyle: "inheader",
				AuthUrl:   "/oauth2/authorize",
				TokenUrl:  "/api/oauth2/token",
				Enabled:   true,
				ClientId:  "grafanaNetClientId",
			},
		},
		{
			name: "should setup the connector using auth.grafana_com section if both are enabled",
			rawIniContent: `
			[auth.grafana_com]
			enabled = true
			client_id = grafanaComClientId
			
			[auth.grafananet]
			enabled = true
			client_id = grafanaNetClientId`,
			expectedGrafanaComOAuthInfo: &social.OAuthInfo{
				AuthStyle: "inheader",
				AuthUrl:   "/oauth2/authorize",
				TokenUrl:  "/api/oauth2/token",
				Enabled:   true,
				ClientId:  "grafanaComClientId",
			},
		},
		{
			name: "should not setup the connector when both are disabled",
			rawIniContent: `
			[auth.grafana_com]
			enabled = false
			client_id = grafanaComClientId
			
			[auth.grafananet]
			enabled = false
			client_id = grafanaNetClientId`,
			expectedGrafanaComOAuthInfo: nil,
		},
	}

	cfg := setting.NewCfg()
	secrets := secretsfake.NewMockService(t)
	accessControl := acimpl.ProvideAccessControl(cfg)
	sqlStore := db.InitTestDB(t)

	ssoSettingsSvc := ssosettingsimpl.ProvideService(cfg, sqlStore, accessControl, routing.NewRouteRegister(), featuremgmt.WithFeatures(), secrets, &usagestats.UsageStatsMock{}, nil)

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			iniFile, err := ini.Load([]byte(tc.rawIniContent))
			require.NoError(t, err)

			cfg := setting.NewCfg()
			cfg.Raw = iniFile

			socialService := ProvideService(cfg, featuremgmt.WithFeatures(), &usagestats.UsageStatsMock{}, supportbundlestest.NewFakeBundleService(), remotecache.NewFakeStore(t), ssoSettingsSvc)
			require.EqualValues(t, tc.expectedGrafanaComOAuthInfo, socialService.GetOAuthInfoProvider("grafana_com"))
		})
	}
}