Chore: Copy sqlstore methods to user store (#56280)

* Chore: Copy sqlstore methods to user store

* Fix xorm tag

* Add tests

* Remove unused methods from sqlstore
This commit is contained in:
idafurjes
2022-10-04 14:14:32 +02:00
committed by GitHub
parent 3d58f39b25
commit a25516fbe3
12 changed files with 175 additions and 150 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ type FakeUserService struct {
ExpectedError error
ExpectedSetUsingOrgError error
ExpectedSearchUsers user.SearchUserQueryResult
ExpectedUSerProfileDTO user.UserProfileDTO
ExpectedUserProfileDTO *user.UserProfileDTO
GetSignedInUserFn func(ctx context.Context, query *user.GetSignedInUserQuery) (*user.SignedInUser, error)
}
@@ -83,7 +83,7 @@ func (f *FakeUserService) BatchDisableUsers(ctx context.Context, cmd *user.Batch
return f.ExpectedError
}
func (f *FakeUserService) UpdatePermissions(userID int64, isAdmin bool) error {
func (f *FakeUserService) UpdatePermissions(ctx context.Context, userID int64, isAdmin bool) error {
return f.ExpectedError
}
@@ -91,6 +91,6 @@ func (f *FakeUserService) SetUserHelpFlag(ctx context.Context, cmd *user.SetUser
return f.ExpectedError
}
func (f *FakeUserService) GetProfile(ctx context.Context, query *user.GetUserProfileQuery) (user.UserProfileDTO, error) {
return f.ExpectedUSerProfileDTO, f.ExpectedError
func (f *FakeUserService) GetProfile(ctx context.Context, query *user.GetUserProfileQuery) (*user.UserProfileDTO, error) {
return f.ExpectedUserProfileDTO, f.ExpectedError
}