Chore: Remove methods from sqlstore interface (#55802)

* Remove SearchOrgUsers from sqlstore interface

* Remove RemoveOrgUser method from sqlstore interface

* Delete RemoveOrgUser from sqlstore

* Fix lint
This commit is contained in:
idafurjes
2022-09-27 15:33:38 +02:00
committed by GitHub
parent 332e8477c7
commit 56cfe02ca2
10 changed files with 501 additions and 493 deletions
+16 -7
View File
@@ -54,13 +54,14 @@ func TestOrgService(t *testing.T) {
}
type FakeOrgStore struct {
ExpectedOrg *org.Org
ExpectedOrgID int64
ExpectedUserID int64
ExpectedError error
ExpectedUserOrgs []*org.UserOrgDTO
ExpectedOrgs []*org.OrgDTO
ExpectedOrgUsers []*org.OrgUserDTO
ExpectedOrg *org.Org
ExpectedOrgID int64
ExpectedUserID int64
ExpectedError error
ExpectedUserOrgs []*org.UserOrgDTO
ExpectedOrgs []*org.OrgDTO
ExpectedOrgUsers []*org.OrgUserDTO
ExpectedSearchOrgUsersQueryResult *org.SearchOrgUsersQueryResult
}
func newOrgStoreFake() *FakeOrgStore {
@@ -118,3 +119,11 @@ func (f *FakeOrgStore) UpdateOrgUser(ctx context.Context, cmd *org.UpdateOrgUser
func (f *FakeOrgStore) GetOrgUsers(ctx context.Context, query *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error) {
return f.ExpectedOrgUsers, f.ExpectedError
}
func (f *FakeOrgStore) SearchOrgUsers(ctx context.Context, query *org.SearchOrgUsersQuery) (*org.SearchOrgUsersQueryResult, error) {
return f.ExpectedSearchOrgUsersQueryResult, f.ExpectedError
}
func (f *FakeOrgStore) RemoveOrgUser(ctx context.Context, cmd *org.RemoveOrgUserCommand) error {
return f.ExpectedError
}