Chore: Remove methods from store interface (#55765)

* Chore: Remove methods from store interface

* Fix api tests

* Remove sqlstore methods, add org store tests, add GetOrgUsers to org store interface

* Fix lint

* Remove debug logs

* Remove commented out methods
This commit is contained in:
idafurjes
2022-09-27 10:34:31 +02:00
committed by GitHub
parent 708225f69f
commit 2bfd26249b
11 changed files with 584 additions and 397 deletions
+13
View File
@@ -60,6 +60,7 @@ type FakeOrgStore struct {
ExpectedError error
ExpectedUserOrgs []*org.UserOrgDTO
ExpectedOrgs []*org.OrgDTO
ExpectedOrgUsers []*org.OrgUserDTO
}
func newOrgStoreFake() *FakeOrgStore {
@@ -105,3 +106,15 @@ func (f *FakeOrgStore) Search(ctx context.Context, query *org.SearchOrgsQuery) (
func (f *FakeOrgStore) CreateWithMember(ctx context.Context, cmd *org.CreateOrgCommand) (*org.Org, error) {
return f.ExpectedOrg, f.ExpectedError
}
func (f *FakeOrgStore) AddOrgUser(ctx context.Context, cmd *org.AddOrgUserCommand) error {
return f.ExpectedError
}
func (f *FakeOrgStore) UpdateOrgUser(ctx context.Context, cmd *org.UpdateOrgUserCommand) error {
return f.ExpectedError
}
func (f *FakeOrgStore) GetOrgUsers(ctx context.Context, query *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error) {
return f.ExpectedOrgUsers, f.ExpectedError
}