Chore: Remove Result field from serviceaccounts, ualert (#62476)

* Chore: Remove Result field from serviceaccounts
* Chore: Remove Result field from ualert
This commit is contained in:
suntala
2023-01-31 09:51:55 +01:00
committed by GitHub
parent d3897b612f
commit 51bef166c2
13 changed files with 37 additions and 43 deletions
+3 -4
View File
@@ -260,7 +260,7 @@ var _ service = new(fakeService)
type fakeService struct {
service
ExpectedErr error
ExpectedApiKey *apikey.APIKey
ExpectedAPIKey *apikey.APIKey
ExpectedServiceAccountTokens []apikey.APIKey
ExpectedServiceAccount *serviceaccounts.ServiceAccountDTO
ExpectedServiceAccountProfile *serviceaccounts.ServiceAccountProfileDTO
@@ -286,9 +286,8 @@ func (f *fakeService) UpdateServiceAccount(ctx context.Context, orgID, id int64,
return f.ExpectedServiceAccountProfile, f.ExpectedErr
}
func (f *fakeService) AddServiceAccountToken(ctx context.Context, id int64, cmd *serviceaccounts.AddServiceAccountTokenCommand) error {
cmd.Result = f.ExpectedApiKey
return f.ExpectedErr
func (f *fakeService) AddServiceAccountToken(ctx context.Context, id int64, cmd *serviceaccounts.AddServiceAccountTokenCommand) (*apikey.APIKey, error) {
return f.ExpectedAPIKey, f.ExpectedErr
}
func (f *fakeService) DeleteServiceAccountToken(ctx context.Context, orgID, id, tokenID int64) error {