Bus: Tests cleanup (#46025)

* Delete unused bus from usagestats

* Few updates to remove bus from searchusers test

* Fix import
This commit is contained in:
Selene
2022-03-02 11:05:31 +01:00
committed by GitHub
parent 5eaf6509c0
commit 2e6f14d17f
6 changed files with 45 additions and 75 deletions
@@ -30,6 +30,7 @@ type SQLStoreMock struct {
ExpectedDashboardSnapshot *models.DashboardSnapshot
ExpectedTeamsByUser []*models.TeamDTO
ExpectedSearchOrgList []*models.OrgDTO
ExpectedSearchUsers models.SearchUserQueryResult
ExpectedDatasources []*models.DataSource
ExpectedOrg *models.Org
ExpectedSystemStats *models.SystemStats
@@ -193,6 +194,11 @@ func (m *SQLStoreMock) GetSignedInUser(ctx context.Context, query *models.GetSig
return m.ExpectedError
}
func (m *SQLStoreMock) SearchUsers(ctx context.Context, query *models.SearchUsersQuery) error {
query.Result = m.ExpectedSearchUsers
return m.ExpectedError
}
func (m *SQLStoreMock) DisableUser(ctx context.Context, cmd *models.DisableUserCommand) error {
m.LatestUserId = cmd.UserId
return m.ExpectedError