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/web" ) func ProvideTestEnv( server *Server, db db.DB, repldb db.ReplDB, cfg *setting.Cfg, ns *notifications.NotificationServiceMock, grpcServer grpcserver.Provider, pluginRegistry registry.Service, httpClientProvider httpclient.Provider, oAuthTokenService *oauthtokentest.Service, featureMgmt featuremgmt.FeatureToggles, ) (*TestEnv, error) { return &TestEnv{ Server: server, SQLStore: db, ReadReplStore: repldb, Cfg: cfg, NotificationService: ns, GRPCServer: grpcServer, PluginRegistry: pluginRegistry, HTTPClientProvider: httpClientProvider, OAuthTokenService: oAuthTokenService, FeatureToggles: featureMgmt, }, nil } type TestEnv struct { Server *Server SQLStore db.DB ReadReplStore db.ReplDB Cfg *setting.Cfg NotificationService *notifications.NotificationServiceMock GRPCServer grpcserver.Provider PluginRegistry registry.Service HTTPClientProvider httpclient.Provider OAuthTokenService *oauthtokentest.Service RequestMiddleware web.Middleware FeatureToggles featuremgmt.FeatureToggles }