Users: Use Remote Cache for storing signed in users [v9.3.x] (#59883) (#59934)

* FeatureToggle: for storing signed in user object in a Remote Cache (#59883)

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Gabriel MABILLE
2022-12-07 11:04:41 +01:00
committed by GitHub
parent a32d25bbe3
commit 3adad3c21a
12 changed files with 107 additions and 16 deletions
+3
View File
@@ -7,6 +7,7 @@ import (
"github.com/grafana/grafana/pkg/infra/localcache"
"github.com/grafana/grafana/pkg/models/roletype"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/org/orgtest"
"github.com/grafana/grafana/pkg/services/team/teamtest"
@@ -24,6 +25,7 @@ func TestUserService(t *testing.T) {
store: userStore,
orgService: orgService,
cacheService: localcache.ProvideService(),
features: featuremgmt.WithFeatures(),
}
t.Run("create user", func(t *testing.T) {
@@ -102,6 +104,7 @@ func TestUserService(t *testing.T) {
orgService: orgService,
cacheService: localcache.ProvideService(),
teamService: teamtest.NewFakeService(),
features: featuremgmt.WithFeatures(),
}
usr := &user.SignedInUser{
OrgID: 1,