unified-storage: Reduce calls to the user service (#102934)
* Create ListByIdOrUID in user service * create UnstructuredToLegacyFolderList * update GetFolders to use list parser * update GetDescendants to use list parser * update UnstructuredToLegacyFolder to also make a single call to the user service --------- Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
co-authored by
Stephanie Hingtgen
parent
7e3efb3df2
commit
51825cfffe
@@ -274,6 +274,7 @@ type FakeUserStore struct {
|
||||
ExpectedError error
|
||||
ExpectedDeleteUserError error
|
||||
ExpectedCountUserAccountsWithEmptyRoles int64
|
||||
ExpectedListUsersByIdOrUid []*user.User
|
||||
}
|
||||
|
||||
func newUserStoreFake() *FakeUserStore {
|
||||
@@ -296,6 +297,10 @@ func (f *FakeUserStore) GetByUID(context.Context, string) (*user.User, error) {
|
||||
return f.ExpectedUser, f.ExpectedError
|
||||
}
|
||||
|
||||
func (f *FakeUserStore) ListByIdOrUID(context.Context, []string, []int64) ([]*user.User, error) {
|
||||
return f.ExpectedListUsersByIdOrUid, f.ExpectedError
|
||||
}
|
||||
|
||||
func (f *FakeUserStore) LoginConflict(context.Context, string, string) error {
|
||||
return f.ExpectedError
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user