mirror of https://github.com/grafana/grafana.git
Tests: Add delete user mock field to fake auth info service (#102947)
This commit is contained in:
parent
6822805c32
commit
9ca1d8bca7
|
|
@ -14,8 +14,9 @@ type FakeService struct {
|
|||
ExpectedError error
|
||||
ExpectedLabels map[int64]string
|
||||
|
||||
SetAuthInfoFn func(ctx context.Context, cmd *login.SetAuthInfoCommand) error
|
||||
UpdateAuthInfoFn func(ctx context.Context, cmd *login.UpdateAuthInfoCommand) error
|
||||
SetAuthInfoFn func(ctx context.Context, cmd *login.SetAuthInfoCommand) error
|
||||
UpdateAuthInfoFn func(ctx context.Context, cmd *login.UpdateAuthInfoCommand) error
|
||||
DeleteUserAuthInfoFn func(ctx context.Context, userID int64) error
|
||||
}
|
||||
|
||||
func (a *FakeService) GetAuthInfo(ctx context.Context, query *login.GetAuthInfoQuery) (*login.UserAuth, error) {
|
||||
|
|
@ -44,5 +45,9 @@ func (a *FakeService) UpdateAuthInfo(ctx context.Context, cmd *login.UpdateAuthI
|
|||
}
|
||||
|
||||
func (a *FakeService) DeleteUserAuthInfo(ctx context.Context, userID int64) error {
|
||||
if a.DeleteUserAuthInfoFn != nil {
|
||||
return a.DeleteUserAuthInfoFn(ctx, userID)
|
||||
}
|
||||
|
||||
return a.ExpectedError
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue