mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -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{
|
return keyGen.ClientSecret, &user.SignedInUser{
|
||||||
UserID: account.ID,
|
UserID: account.ID,
|
||||||
Email: account.Email,
|
Email: account.Email,
|
||||||
Name: account.Name,
|
Name: account.Name,
|
||||||
Login: account.Login,
|
Login: account.Login,
|
||||||
OrgID: account.OrgID,
|
OrgID: account.OrgID,
|
||||||
|
IsServiceAccount: account.IsServiceAccount,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/models"
|
"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/services/store/object"
|
||||||
"github.com/grafana/grafana/pkg/util"
|
"github.com/grafana/grafana/pkg/util"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
@ -120,7 +121,7 @@ func TestIntegrationObjectServer(t *testing.T) {
|
|||||||
testCtx := createTestContext(t)
|
testCtx := createTestContext(t)
|
||||||
ctx := metadata.AppendToOutgoingContext(testCtx.ctx, "authorization", fmt.Sprintf("Bearer %s", testCtx.authToken))
|
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"
|
firstVersion := "1"
|
||||||
kind := models.StandardKindJSONObj
|
kind := models.StandardKindJSONObj
|
||||||
grn := &object.GRN{
|
grn := &object.GRN{
|
||||||
|
Loading…
Reference in New Issue
Block a user