mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
Storage: fix failing test (set IsServiceAccount=true) (#58257)
This commit is contained in:
parent
d581b368bd
commit
22628d1f7e
@ -42,11 +42,12 @@ func createServiceAccountAdminToken(t *testing.T, env *server.TestEnv) (string,
|
||||
})
|
||||
|
||||
return keyGen.ClientSecret, &user.SignedInUser{
|
||||
UserID: account.ID,
|
||||
Email: account.Email,
|
||||
Name: account.Name,
|
||||
Login: account.Login,
|
||||
OrgID: account.OrgID,
|
||||
UserID: account.ID,
|
||||
Email: account.Email,
|
||||
Name: account.Name,
|
||||
Login: account.Login,
|
||||
OrgID: account.OrgID,
|
||||
IsServiceAccount: account.IsServiceAccount,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/store"
|
||||
"github.com/grafana/grafana/pkg/services/store/object"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -120,7 +121,7 @@ func TestIntegrationObjectServer(t *testing.T) {
|
||||
testCtx := createTestContext(t)
|
||||
ctx := metadata.AppendToOutgoingContext(testCtx.ctx, "authorization", fmt.Sprintf("Bearer %s", testCtx.authToken))
|
||||
|
||||
fakeUser := fmt.Sprintf("user:%d:%s", testCtx.user.UserID, testCtx.user.Login)
|
||||
fakeUser := store.GetUserIDString(testCtx.user)
|
||||
firstVersion := "1"
|
||||
kind := models.StandardKindJSONObj
|
||||
grn := &object.GRN{
|
||||
|
Loading…
Reference in New Issue
Block a user