ResourceServer: make the resource store the default unified storage backend (#90899)
* make the resource store the default unified storage backend * add integration tests * fix test non passing * Update pkg/storage/unified/sql/test/integration_test.go Co-authored-by: Ryan McKinley <ryantxu@gmail.com> * lint * fix tests * fix no rows --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
0b822478b6
commit
4baca6947d
@@ -15,8 +15,8 @@ import (
|
||||
"github.com/grafana/grafana/pkg/modules"
|
||||
"github.com/grafana/grafana/pkg/services/authz"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
storageServer "github.com/grafana/grafana/pkg/services/store/entity/server"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/storage/unified/sql"
|
||||
)
|
||||
|
||||
// NewModule returns an instance of a ModuleServer, responsible for managing
|
||||
@@ -131,7 +131,7 @@ func (s *ModuleServer) Run() error {
|
||||
//}
|
||||
|
||||
m.RegisterModule(modules.StorageServer, func() (services.Service, error) {
|
||||
return storageServer.ProvideService(s.cfg, s.features, s.log)
|
||||
return sql.ProvideService(s.cfg, s.features, nil, s.log)
|
||||
})
|
||||
|
||||
m.RegisterModule(modules.ZanzanaServer, func() (services.Service, error) {
|
||||
|
||||
@@ -63,7 +63,7 @@ func TestIntegrationWillRunInstrumentationServerWhenTargetHasNoHttpServer(t *tes
|
||||
}
|
||||
|
||||
func addStorageServerToConfig(t *testing.T, cfg *setting.Cfg, dbType string) {
|
||||
s, err := cfg.Raw.NewSection("entity_api")
|
||||
s, err := cfg.Raw.NewSection("resource_api")
|
||||
require.NoError(t, err)
|
||||
_, err = s.NewKey("db_type", dbType)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user