mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
a21a232a8e
* Revert "chore: add replDB to team service (#91799)" This reverts commitc6ae2d7999
. * Revert "experiment: use read replica for Get and Find Dashboards (#91706)" This reverts commit54177ca619
. * Revert "QuotaService: refactor to use ReplDB for Get queries (#91333)" This reverts commit299c142f6a
. * Revert "refactor replCfg to look more like plugins/plugin config (#91142)" This reverts commitac0b4bb34d
. * Revert "chore (replstore): fix registration with multiple sql drivers, again (#90990)" This reverts commitdaedb358dd
. * Revert "Chore (sqlstore): add validation and testing for repl config (#90683)" This reverts commitaf19f039b6
. * Revert "ReplStore: Add support for round robin load balancing between multiple read replicas (#90530)" This reverts commit27b52b1507
. * Revert "DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235)" This reverts commit8a6107cd35
. * Revert "accesscontrol service read replica (#89963)" This reverts commit77a4869fca
. * Revert "Fix: add mapping for the new mysqlRepl driver (#89551)" This reverts commitab5a079bcc
. * Revert "fix: sql instrumentation dual registration error (#89508)" This reverts commitd988f5c3b0
. * Revert "Experimental Feature Toggle: databaseReadReplica (#89232)" This reverts commit50244ed4a1
.
55 lines
1.7 KiB
Go
55 lines
1.7 KiB
Go
package server
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/infra/db"
|
|
"github.com/grafana/grafana/pkg/infra/httpclient"
|
|
"github.com/grafana/grafana/pkg/plugins/manager/registry"
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
|
"github.com/grafana/grafana/pkg/services/grpcserver"
|
|
"github.com/grafana/grafana/pkg/services/notifications"
|
|
"github.com/grafana/grafana/pkg/services/oauthtoken/oauthtokentest"
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
"github.com/grafana/grafana/pkg/storage/unified/resource"
|
|
"github.com/grafana/grafana/pkg/web"
|
|
)
|
|
|
|
func ProvideTestEnv(
|
|
server *Server,
|
|
db db.DB,
|
|
cfg *setting.Cfg,
|
|
ns *notifications.NotificationServiceMock,
|
|
grpcServer grpcserver.Provider,
|
|
pluginRegistry registry.Service,
|
|
httpClientProvider httpclient.Provider,
|
|
oAuthTokenService *oauthtokentest.Service,
|
|
featureMgmt featuremgmt.FeatureToggles,
|
|
resourceClient resource.ResourceClient,
|
|
) (*TestEnv, error) {
|
|
return &TestEnv{
|
|
Server: server,
|
|
SQLStore: db,
|
|
Cfg: cfg,
|
|
NotificationService: ns,
|
|
GRPCServer: grpcServer,
|
|
PluginRegistry: pluginRegistry,
|
|
HTTPClientProvider: httpClientProvider,
|
|
OAuthTokenService: oAuthTokenService,
|
|
FeatureToggles: featureMgmt,
|
|
ResourceClient: resourceClient,
|
|
}, nil
|
|
}
|
|
|
|
type TestEnv struct {
|
|
Server *Server
|
|
SQLStore db.DB
|
|
Cfg *setting.Cfg
|
|
NotificationService *notifications.NotificationServiceMock
|
|
GRPCServer grpcserver.Provider
|
|
PluginRegistry registry.Service
|
|
HTTPClientProvider httpclient.Provider
|
|
OAuthTokenService *oauthtokentest.Service
|
|
RequestMiddleware web.Middleware
|
|
FeatureToggles featuremgmt.FeatureToggles
|
|
ResourceClient resource.ResourceClient
|
|
}
|