diff --git a/default_api.go b/default_api.go index cc6d567..62b78f1 100644 --- a/default_api.go +++ b/default_api.go @@ -64,7 +64,7 @@ func (a *DefaultApiService) AddGroupToUser(ctx context.Context) (*APIResponse, e localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -118,7 +118,7 @@ func (a *DefaultApiService) AddUserToGroup(ctx context.Context) (*APIResponse, e localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -172,7 +172,7 @@ func (a *DefaultApiService) AddUserToGroups(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -226,7 +226,7 @@ func (a *DefaultApiService) AddUsersToGroup(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -282,7 +282,7 @@ func (a *DefaultApiService) Approve(pullRequestID int64) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -338,7 +338,7 @@ func (a *DefaultApiService) AssignParticipantRole(pullRequestID int64) (*APIResp localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -396,7 +396,7 @@ func (a *DefaultApiService) CanMerge(projectKey, repositorySlug string, pullRequ localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -450,7 +450,7 @@ func (a *DefaultApiService) ClearSenderAddress(ctx context.Context) (*APIRespons localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -513,7 +513,7 @@ func (a *DefaultApiService) ClearUserCaptchaChallenge(localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -570,7 +570,7 @@ func (a *DefaultApiService) CountPullRequestTasks(projectKey, repositorySlug str localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -631,7 +631,7 @@ func (a *DefaultApiService) Create(projectKey, repositorySlug string, localVarOp localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -685,7 +685,7 @@ func (a *DefaultApiService) CreateBranch(ctx context.Context) (*APIResponse, err localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -750,7 +750,7 @@ func (a *DefaultApiService) CreateComment(commitId string, localVarOptionals map localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -803,7 +803,7 @@ func (a *DefaultApiService) CreateComment_1(projectKey, repositorySlug string, p localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -866,7 +866,7 @@ func (a *DefaultApiService) CreateGroup(localVarOptionals map[string]interface{} localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -920,7 +920,7 @@ func (a *DefaultApiService) CreateProject(ctx context.Context) (*APIResponse, er localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -976,7 +976,7 @@ func (a *DefaultApiService) CreateRepositoryWithOptions(projectKey string, local localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1025,7 +1025,7 @@ func (a *DefaultApiService) CreatePullRequestWithOptions(projectKey, repo string localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1079,7 +1079,7 @@ func (a *DefaultApiService) CreateTag(ctx context.Context) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1133,7 +1133,7 @@ func (a *DefaultApiService) CreateTask(ctx context.Context) (*APIResponse, error localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1231,7 +1231,7 @@ func (a *DefaultApiService) CreateUser(localVarOptionals map[string]interface{}) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1283,7 +1283,7 @@ func (a *DefaultApiService) CreateWebhook(projectKey, repositorySlug string, loc localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1348,7 +1348,7 @@ func (a *DefaultApiService) Decline(pullRequestID int64, localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1404,7 +1404,7 @@ func (a *DefaultApiService) Delete(pullRequestID int64) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1458,7 +1458,7 @@ func (a *DefaultApiService) DeleteAvatar(ctx context.Context) (*APIResponse, err localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1527,7 +1527,7 @@ func (a *DefaultApiService) DeleteComment(commitId string, commentId int64, comm localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1592,7 +1592,7 @@ func (a *DefaultApiService) DeleteComment_2(commentId int64, localVarOptionals m localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1655,7 +1655,7 @@ func (a *DefaultApiService) DeleteGroup(localVarOptionals map[string]interface{} localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1709,7 +1709,7 @@ func (a *DefaultApiService) DeleteMailConfig(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1763,7 +1763,7 @@ func (a *DefaultApiService) DeleteProject(ctx context.Context) (*APIResponse, er localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1822,7 +1822,7 @@ func (a *DefaultApiService) DeleteRepository(projectKey, repositorySlug string) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1878,7 +1878,7 @@ func (a *DefaultApiService) DeleteRepositoryHook(hookKey string) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1934,7 +1934,7 @@ func (a *DefaultApiService) DeleteTask(taskId int64) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -1997,7 +1997,7 @@ func (a *DefaultApiService) DeleteUser(localVarOptionals map[string]interface{}) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2055,7 +2055,7 @@ func (a *DefaultApiService) DeleteWebhook(projectKey, repositorySlug string, web localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2111,7 +2111,7 @@ func (a *DefaultApiService) DisableHook(hookKey string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2167,7 +2167,7 @@ func (a *DefaultApiService) DisableHook_3(hookKey string) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2223,7 +2223,7 @@ func (a *DefaultApiService) EditFile(path string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2288,7 +2288,7 @@ func (a *DefaultApiService) EnableHook(hookKey string, localVarOptionals map[str localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2353,7 +2353,7 @@ func (a *DefaultApiService) EnableHook_4(hookKey string, localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2423,7 +2423,7 @@ func (a *DefaultApiService) FindGroupsForUser(localVarOptionals map[string]inter localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2493,7 +2493,7 @@ func (a *DefaultApiService) FindOtherGroupsForUser(localVarOptionals map[string] localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2563,7 +2563,7 @@ func (a *DefaultApiService) FindUsersInGroup(localVarOptionals map[string]interf localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2633,7 +2633,7 @@ func (a *DefaultApiService) FindUsersNotInGroup(localVarOptionals map[string]int localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2705,7 +2705,7 @@ func (a *DefaultApiService) FindWebhooks(projectKey, repositorySlug string, loca localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2762,7 +2762,7 @@ func (a *DefaultApiService) ForkRepository(projectKey, repositorySlug string, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2816,7 +2816,7 @@ func (a *DefaultApiService) Get(ctx context.Context) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2888,7 +2888,7 @@ func (a *DefaultApiService) GetActivities(pullRequestID int64, localVarOptionals localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -2942,7 +2942,7 @@ func (a *DefaultApiService) GetApplicationProperties(ctx context.Context) (*APIR localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3035,7 +3035,7 @@ func (a *DefaultApiService) GetArchive(project, repository string, localVarOptio localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3100,7 +3100,7 @@ func (a *DefaultApiService) GetAvatar(hookKey string, localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3186,7 +3186,7 @@ func (a *DefaultApiService) GetBranches(project, repository string, localVarOpti localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3256,7 +3256,7 @@ func (a *DefaultApiService) GetChanges(localVarOptionals map[string]interface{}) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3328,7 +3328,7 @@ func (a *DefaultApiService) GetChanges_5(commitId string, localVarOptionals map[ localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3388,7 +3388,7 @@ func (a *DefaultApiService) GetComment(commitId string, commentId int64, commitI localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3444,7 +3444,7 @@ func (a *DefaultApiService) GetComment_6(commentId int64) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3516,7 +3516,7 @@ func (a *DefaultApiService) GetComments(commitId string, localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3607,7 +3607,7 @@ func (a *DefaultApiService) GetComments_7(localVarOptionals map[string]interface localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3672,7 +3672,7 @@ func (a *DefaultApiService) GetCommit(commitId string, localVarOptionals map[str localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3780,7 +3780,7 @@ func (a *DefaultApiService) GetCommits(project, repository string, localVarOptio localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3845,7 +3845,7 @@ func (a *DefaultApiService) GetCommits_8(pullRequestID int64, localVarOptionals localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -3942,7 +3942,7 @@ func (a *DefaultApiService) getContentWithPath(projectKey string, repositorySlug localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4028,7 +4028,7 @@ func (a *DefaultApiService) GetContent_9(path string, localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4112,7 +4112,7 @@ func (a *DefaultApiService) GetContent_10(localVarOptionals map[string]interface localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4198,7 +4198,7 @@ func (a *DefaultApiService) GetContent_11(path string, localVarOptionals map[str localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4252,7 +4252,7 @@ func (a *DefaultApiService) GetDefaultBranch(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4308,7 +4308,7 @@ func (a *DefaultApiService) GetForkedRepositories(projectKey string) (*APIRespon localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4371,7 +4371,7 @@ func (a *DefaultApiService) GetGroups(localVarOptionals map[string]interface{}) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4434,7 +4434,7 @@ func (a *DefaultApiService) GetGroupsWithAnyPermission(localVarOptionals map[str localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4497,7 +4497,7 @@ func (a *DefaultApiService) GetGroupsWithAnyPermission_12(localVarOptionals map[ localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4560,7 +4560,7 @@ func (a *DefaultApiService) GetGroupsWithAnyPermission_13(localVarOptionals map[ localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4623,7 +4623,7 @@ func (a *DefaultApiService) GetGroupsWithoutAnyPermission(localVarOptionals map[ localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4686,7 +4686,7 @@ func (a *DefaultApiService) GetGroupsWithoutAnyPermission_14(localVarOptionals m localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4749,7 +4749,7 @@ func (a *DefaultApiService) GetGroupsWithoutAnyPermission_15(localVarOptionals m localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4812,7 +4812,7 @@ func (a *DefaultApiService) GetGroups_16(localVarOptionals map[string]interface{ localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4866,7 +4866,7 @@ func (a *DefaultApiService) GetInformation(ctx context.Context) (*APIResponse, e localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4938,7 +4938,7 @@ func (a *DefaultApiService) GetLatestInvocation(webhookId int32, localVarOptiona localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -4994,7 +4994,7 @@ func (a *DefaultApiService) GetLevel(loggerName string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5048,7 +5048,7 @@ func (a *DefaultApiService) GetMailConfig(ctx context.Context) (*APIResponse, er localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5104,7 +5104,7 @@ func (a *DefaultApiService) GetMergeConfig(scmId string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5204,7 +5204,7 @@ func (a *DefaultApiService) GetPullRequestsPage(projectKey, repositorySlug strin localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5258,7 +5258,7 @@ func (a *DefaultApiService) GetProject(ctx context.Context) (*APIResponse, error localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5321,7 +5321,7 @@ func (a *DefaultApiService) GetProjectAvatar(localVarOptionals map[string]interf localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5405,7 +5405,7 @@ func (a *DefaultApiService) GetProjects(localVarOptionals map[string]interface{} localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5458,7 +5458,7 @@ func (a *DefaultApiService) GetPullRequestCount(ctx context.Context) (*APIRespon localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5512,7 +5512,7 @@ func (a *DefaultApiService) GetPullRequestSettings(ctx context.Context) (*APIRes localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5568,7 +5568,7 @@ func (a *DefaultApiService) GetPullRequestSettings_17(scmId string) (*APIRespons localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5638,7 +5638,7 @@ func (a *DefaultApiService) GetPullRequestSuggestions(localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5692,7 +5692,7 @@ func (a *DefaultApiService) GetPullRequestTasks(ctx context.Context) (*APIRespon localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5783,7 +5783,7 @@ func (a *DefaultApiService) GetPullRequests(localVarOptionals map[string]interfa localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5859,7 +5859,7 @@ func (a *DefaultApiService) GetPullRequests_18(localVarOptionals map[string]inte localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5915,7 +5915,7 @@ func (a *DefaultApiService) GetRelatedRepositories(projectKey string) (*APIRespo localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -5989,7 +5989,7 @@ func (a *DefaultApiService) GetRepositoriesWithOptions(projectKey string, localV localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6052,7 +6052,7 @@ func (a *DefaultApiService) GetRepositoriesRecentlyAccessed(localVarOptionals ma localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6148,7 +6148,7 @@ func (a *DefaultApiService) GetRepositories_19(localVarOptionals map[string]inte localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6207,7 +6207,7 @@ func (a *DefaultApiService) GetRepository(projectKey, repositorySlug string) (*A localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6266,7 +6266,7 @@ func (a *DefaultApiService) GetUserRepository(username, repositorySlug string) ( localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6324,7 +6324,7 @@ func (a *DefaultApiService) GetPullRequest(projectKey, repositorySlug string, pu localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6382,7 +6382,7 @@ func (a *DefaultApiService) GetPullRequestActivity(projectKey, repositorySlug st localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6459,7 +6459,7 @@ func (a *DefaultApiService) GetPullRequestCommitsWithOptions(projectKey, reposit localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6510,7 +6510,7 @@ func (a *DefaultApiService) GetCommitBuildStatuses(commitSHA string) (*APIRespon localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6566,7 +6566,7 @@ func (a *DefaultApiService) GetRepositoryHook(hookKey string) (*APIResponse, err localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6622,7 +6622,7 @@ func (a *DefaultApiService) GetRepositoryHook_20(hookKey string) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6685,7 +6685,7 @@ func (a *DefaultApiService) GetRepositoryHooks(localVarOptionals map[string]inte localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6748,7 +6748,7 @@ func (a *DefaultApiService) GetRepositoryHooks_21(localVarOptionals map[string]i localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6802,7 +6802,7 @@ func (a *DefaultApiService) GetRootLevel(ctx context.Context) (*APIResponse, err localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6856,7 +6856,7 @@ func (a *DefaultApiService) GetSenderAddress(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6912,7 +6912,7 @@ func (a *DefaultApiService) GetSettings(hookKey string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -6968,7 +6968,7 @@ func (a *DefaultApiService) GetSettings_22(hookKey string) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7033,7 +7033,7 @@ func (a *DefaultApiService) GetStatistics(webhookId int32, localVarOptionals map localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7089,7 +7089,7 @@ func (a *DefaultApiService) GetStatisticsSummary(webhookId int32) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7145,7 +7145,7 @@ func (a *DefaultApiService) GetTag(name string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7217,7 +7217,7 @@ func (a *DefaultApiService) GetTags(project, repository string, localVarOptional localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7273,7 +7273,7 @@ func (a *DefaultApiService) GetTask(taskId int64) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7328,7 +7328,7 @@ func (a *DefaultApiService) GetSSHKeys(user string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7393,7 +7393,7 @@ func (a *DefaultApiService) CreateSSHKey(localVarOptionals map[string]interface{ localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7449,7 +7449,7 @@ func (a *DefaultApiService) GetUser(username string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7503,7 +7503,7 @@ func (a *DefaultApiService) GetUserSettings(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7566,7 +7566,7 @@ func (a *DefaultApiService) GetUsers(localVarOptionals map[string]interface{}) ( localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7629,7 +7629,7 @@ func (a *DefaultApiService) GetUsersWithAnyPermission(localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7692,7 +7692,7 @@ func (a *DefaultApiService) GetUsersWithAnyPermission_23(localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7755,7 +7755,7 @@ func (a *DefaultApiService) GetUsersWithAnyPermission_24(localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7818,7 +7818,7 @@ func (a *DefaultApiService) GetUsersWithoutAnyPermission(localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7881,7 +7881,7 @@ func (a *DefaultApiService) GetUsersWithoutPermission(localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7944,7 +7944,7 @@ func (a *DefaultApiService) GetUsersWithoutPermission_25(localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -7998,7 +7998,7 @@ func (a *DefaultApiService) GetUsers_26(ctx context.Context) (*APIResponse, erro localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8063,7 +8063,7 @@ func (a *DefaultApiService) GetWebhook(webhookId int32, localVarOptionals map[st localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8119,7 +8119,7 @@ func (a *DefaultApiService) Get_27(pullRequestID int64) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8175,7 +8175,7 @@ func (a *DefaultApiService) HasAllUserPermission(permission string) (*APIRespons localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8231,7 +8231,7 @@ func (a *DefaultApiService) ListParticipants(pullRequestID int64) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8295,7 +8295,7 @@ func (a *DefaultApiService) Merge(projectKey, repositorySlug string, pullRequest localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8360,7 +8360,7 @@ func (a *DefaultApiService) ModifyAllUserPermission(permission string, localVarO localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8437,7 +8437,7 @@ func (a *DefaultApiService) Preview(localVarOptionals map[string]interface{}) (* localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8491,7 +8491,7 @@ func (a *DefaultApiService) RemoveGroupFromUser(ctx context.Context) (*APIRespon localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8545,7 +8545,7 @@ func (a *DefaultApiService) RemoveUserFromGroup(ctx context.Context) (*APIRespon localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8599,7 +8599,7 @@ func (a *DefaultApiService) RenameUser(ctx context.Context) (*APIResponse, error localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8664,7 +8664,7 @@ func (a *DefaultApiService) Reopen(pullRequestID int64, localVarOptionals map[st localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8720,7 +8720,7 @@ func (a *DefaultApiService) RetryCreateRepository(projectKey string) (*APIRespon localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8783,7 +8783,7 @@ func (a *DefaultApiService) RevokePermissionsForGroup(localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8846,7 +8846,7 @@ func (a *DefaultApiService) RevokePermissionsForGroup_28(localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8909,7 +8909,7 @@ func (a *DefaultApiService) RevokePermissionsForGroup_29(localVarOptionals map[s localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -8972,7 +8972,7 @@ func (a *DefaultApiService) RevokePermissionsForUser(localVarOptionals map[strin localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9035,7 +9035,7 @@ func (a *DefaultApiService) RevokePermissionsForUser_30(localVarOptionals map[st localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9098,7 +9098,7 @@ func (a *DefaultApiService) RevokePermissionsForUser_31(localVarOptionals map[st localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9175,7 +9175,7 @@ func (a *DefaultApiService) Search(localVarOptionals map[string]interface{}) (*A localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9229,7 +9229,7 @@ func (a *DefaultApiService) SetDefaultBranch(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9287,7 +9287,7 @@ func (a *DefaultApiService) SetLevel(levelName string, loggerName string) (*APIR localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9341,7 +9341,7 @@ func (a *DefaultApiService) SetMailConfig(ctx context.Context) (*APIResponse, er localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9397,7 +9397,7 @@ func (a *DefaultApiService) SetMergeConfig(scmId string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9467,7 +9467,7 @@ func (a *DefaultApiService) SetPermissionForGroup(localVarOptionals map[string]i localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9537,7 +9537,7 @@ func (a *DefaultApiService) SetPermissionForGroups(localVarOptionals map[string] localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9607,7 +9607,7 @@ func (a *DefaultApiService) SetPermissionForGroups_32(localVarOptionals map[stri localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9677,7 +9677,7 @@ func (a *DefaultApiService) SetPermissionForUser(localVarOptionals map[string]in localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9747,7 +9747,7 @@ func (a *DefaultApiService) SetPermissionForUsers(localVarOptionals map[string]i localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9817,7 +9817,7 @@ func (a *DefaultApiService) SetPermissionForUsers_33(localVarOptionals map[strin localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9873,7 +9873,7 @@ func (a *DefaultApiService) SetRootLevel(levelName string) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9927,7 +9927,7 @@ func (a *DefaultApiService) SetSenderAddress(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -9983,7 +9983,7 @@ func (a *DefaultApiService) SetSettings(hookKey string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10039,7 +10039,7 @@ func (a *DefaultApiService) SetSettings_34(hookKey string) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10102,7 +10102,7 @@ func (a *DefaultApiService) Stream(localVarOptionals map[string]interface{}) (*A localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10179,7 +10179,7 @@ func (a *DefaultApiService) StreamChanges(localVarOptionals map[string]interface localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10263,7 +10263,7 @@ func (a *DefaultApiService) StreamChanges_35(localVarOptionals map[string]interf localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10340,7 +10340,7 @@ func (a *DefaultApiService) StreamCommits(project, repository string, localVarOp localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10440,7 +10440,7 @@ func (a *DefaultApiService) StreamDiff(commitId string, localVarOptionals map[st localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10544,7 +10544,7 @@ func (a *DefaultApiService) StreamDiff_36(commitId string, path string, commitId localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10643,7 +10643,7 @@ func (a *DefaultApiService) StreamDiff_37(project, repository, path string, loca localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10734,7 +10734,7 @@ func (a *DefaultApiService) StreamDiff_38(localVarOptionals map[string]interface localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10827,7 +10827,7 @@ func (a *DefaultApiService) StreamDiff_39(path string, localVarOptionals map[str localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -10932,7 +10932,7 @@ func (a *DefaultApiService) StreamDiff_40(localVarOptionals map[string]interface localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11039,7 +11039,7 @@ func (a *DefaultApiService) StreamDiff_41(path string, localVarOptionals map[str localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11102,7 +11102,7 @@ func (a *DefaultApiService) StreamFiles(localVarOptionals map[string]interface{} localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11167,7 +11167,7 @@ func (a *DefaultApiService) StreamFiles_42(path string, localVarOptionals map[st localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11232,7 +11232,7 @@ func (a *DefaultApiService) Stream_43(path string, localVarOptionals map[string] localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11295,7 +11295,7 @@ func (a *DefaultApiService) TestWebhook(localVarOptionals map[string]interface{} localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11360,7 +11360,7 @@ func (a *DefaultApiService) UnassignParticipantRole(pullRequestID int64, localVa localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11420,7 +11420,7 @@ func (a *DefaultApiService) UnassignParticipantRole_44(pullRequestID int64, user localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11476,7 +11476,7 @@ func (a *DefaultApiService) Unwatch(commitId string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11532,7 +11532,7 @@ func (a *DefaultApiService) Unwatch_45(pullRequestID int64) (*APIResponse, error localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11586,7 +11586,7 @@ func (a *DefaultApiService) Update(ctx context.Context) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11646,7 +11646,7 @@ func (a *DefaultApiService) UpdateComment(commitId string, commentId int64, comm localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11702,7 +11702,7 @@ func (a *DefaultApiService) UpdateComment_46(commentId int64) (*APIResponse, err localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11756,7 +11756,7 @@ func (a *DefaultApiService) UpdateProject(ctx context.Context) (*APIResponse, er localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11810,7 +11810,7 @@ func (a *DefaultApiService) UpdatePullRequestSettings(ctx context.Context) (*API localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11866,7 +11866,7 @@ func (a *DefaultApiService) UpdatePullRequestSettings_47(scmId string) (*APIResp localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11925,7 +11925,7 @@ func (a *DefaultApiService) UpdateRepositoryWithOptions(projectKey, repositorySl localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -11979,7 +11979,7 @@ func (a *DefaultApiService) UpdateSettings(ctx context.Context) (*APIResponse, e localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12039,7 +12039,7 @@ func (a *DefaultApiService) UpdateStatus(pullRequestID int64, userSlug string, p localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12095,7 +12095,7 @@ func (a *DefaultApiService) UpdateTask(taskId int64) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12149,7 +12149,7 @@ func (a *DefaultApiService) UpdateUserDetails(ctx context.Context) (*APIResponse localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12203,7 +12203,7 @@ func (a *DefaultApiService) UpdateUserDetails_48(ctx context.Context) (*APIRespo localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12257,7 +12257,7 @@ func (a *DefaultApiService) UpdateUserPassword(ctx context.Context) (*APIRespons localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12311,7 +12311,7 @@ func (a *DefaultApiService) UpdateUserPassword_49(ctx context.Context) (*APIResp localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12365,7 +12365,7 @@ func (a *DefaultApiService) UpdateWebhook(projectKey, repositorySlug string, web localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12421,7 +12421,7 @@ func (a *DefaultApiService) Update_50(pullRequestID int64) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12475,7 +12475,7 @@ func (a *DefaultApiService) UploadAvatar(ctx context.Context) (*APIResponse, err localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12529,7 +12529,7 @@ func (a *DefaultApiService) UploadAvatar_51(ctx context.Context) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12585,7 +12585,7 @@ func (a *DefaultApiService) Watch(commitId string) (*APIResponse, error) { localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12641,7 +12641,7 @@ func (a *DefaultApiService) Watch_52(pullRequestID int64) (*APIResponse, error) localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { @@ -12697,7 +12697,7 @@ func (a *DefaultApiService) WithdrawApproval(pullRequestID int64) (*APIResponse, localVarHTTPResponse, err := a.client.callAPI(r) if err != nil || localVarHTTPResponse == nil { - return NewBitbucketAPIResponse(localVarHTTPResponse) + return NewAPIResponseWithError(localVarHTTPResponse, err) } defer localVarHTTPResponse.Body.Close() if localVarHTTPResponse.StatusCode >= 300 { diff --git a/default_api_test.go b/default_api_test.go index 2fa6778..8ecf79b 100644 --- a/default_api_test.go +++ b/default_api_test.go @@ -7,10 +7,25 @@ package bitbucketv1 import ( "reflect" "testing" + "time" "golang.org/x/net/context" ) +func generateContextCanceled() context.Context { + basicAuth := BasicAuth{UserName: "", Password: ""} + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Millisecond) + ctx = context.WithValue(ctx, ContextBasicAuth, basicAuth) + defer cancel() + return ctx +} + +func generateConfigFake() *APIClient { + return NewAPIClient( + generateContextCanceled(), + NewConfiguration("https://stash.domain.com/rest"), + ) +} func TestDefaultApiService_AddGroupToUser(t *testing.T) { type fields struct { client *APIClient @@ -25,7 +40,7 @@ func TestDefaultApiService_AddGroupToUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{ctx: context.Background()}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/users/add-group: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -58,7 +73,7 @@ func TestDefaultApiService_AddUserToGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{ctx: context.Background()}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/groups/add-user: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -91,7 +106,7 @@ func TestDefaultApiService_AddUserToGroups(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{ctx: context.Background()}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/users/add-groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -124,7 +139,7 @@ func TestDefaultApiService_AddUsersToGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{ctx: context.Background()}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/groups/add-users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -157,7 +172,7 @@ func TestDefaultApiService_Approve(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/approve: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -190,7 +205,7 @@ func TestDefaultApiService_AssignParticipantRole(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/participants: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -225,7 +240,7 @@ func TestDefaultApiService_CanMerge(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0/merge: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -258,7 +273,7 @@ func TestDefaultApiService_ClearSenderAddress(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/admin/mail-server/sender-address: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -291,7 +306,7 @@ func TestDefaultApiService_ClearUserCaptchaChallenge(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/admin/users/captcha: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -326,7 +341,7 @@ func TestDefaultApiService_CountPullRequestTasks(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0/tasks/count: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -361,7 +376,7 @@ func TestDefaultApiService_Create(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -394,7 +409,7 @@ func TestDefaultApiService_CreateBranch(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/branches: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -428,7 +443,7 @@ func TestDefaultApiService_CreateComment(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//comments: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -465,7 +480,7 @@ func TestDefaultApiService_CreateComment_1(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0/comments: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -498,7 +513,7 @@ func TestDefaultApiService_CreateGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -531,7 +546,7 @@ func TestDefaultApiService_CreateProject(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -564,7 +579,7 @@ func TestDefaultApiService_CreateRepository(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -599,7 +614,7 @@ func TestDefaultApiService_CreateRepositoryWithOptions(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -634,7 +649,7 @@ func TestDefaultApiService_CreatePullRequestWithOptions(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -667,7 +682,7 @@ func TestDefaultApiService_CreateTag(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/tags: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -700,7 +715,7 @@ func TestDefaultApiService_CreateTask(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/tasks: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -733,7 +748,7 @@ func TestDefaultApiService_CreateUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -769,7 +784,7 @@ func TestDefaultApiService_CreateWebhook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos//webhooks: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -803,7 +818,7 @@ func TestDefaultApiService_Decline(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/decline: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -836,7 +851,7 @@ func TestDefaultApiService_Delete(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -869,7 +884,7 @@ func TestDefaultApiService_DeleteAvatar(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/users/%7BuserSlug%7D/avatar.png: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -905,7 +920,7 @@ func TestDefaultApiService_DeleteComment(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//comments/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -939,7 +954,7 @@ func TestDefaultApiService_DeleteComment_2(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/comments/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -972,7 +987,7 @@ func TestDefaultApiService_DeleteGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/admin/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1005,7 +1020,7 @@ func TestDefaultApiService_DeleteMailConfig(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/admin/mail-server: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1038,7 +1053,7 @@ func TestDefaultApiService_DeleteProject(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1072,7 +1087,7 @@ func TestDefaultApiService_DeleteRepository(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects//repos/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1105,7 +1120,7 @@ func TestDefaultApiService_DeleteRepositoryHook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/hooks/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1138,7 +1153,7 @@ func TestDefaultApiService_DeleteTask(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/tasks/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1171,7 +1186,7 @@ func TestDefaultApiService_DeleteUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/admin/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1206,7 +1221,7 @@ func TestDefaultApiService_DeleteWebhook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects//repos//webhooks/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1239,7 +1254,7 @@ func TestDefaultApiService_DisableHook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/hooks//enabled: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1272,7 +1287,7 @@ func TestDefaultApiService_DisableHook_3(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/hooks//enabled: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1305,7 +1320,7 @@ func TestDefaultApiService_EditFile(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/browse/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1339,7 +1354,7 @@ func TestDefaultApiService_EnableHook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/hooks//enabled: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1373,7 +1388,7 @@ func TestDefaultApiService_EnableHook_4(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/hooks//enabled: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1406,7 +1421,7 @@ func TestDefaultApiService_FindGroupsForUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/users/more-members: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1439,7 +1454,7 @@ func TestDefaultApiService_FindOtherGroupsForUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/users/more-non-members: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1472,7 +1487,7 @@ func TestDefaultApiService_FindUsersInGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/groups/more-members: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1505,7 +1520,7 @@ func TestDefaultApiService_FindUsersNotInGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/groups/more-non-members: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1540,7 +1555,7 @@ func TestDefaultApiService_FindWebhooks(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//webhooks: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1576,7 +1591,7 @@ func TestDefaultApiService_ForkRepository(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1609,7 +1624,7 @@ func TestDefaultApiService_Get(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/license: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1643,7 +1658,7 @@ func TestDefaultApiService_GetActivities(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/activities: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1676,7 +1691,7 @@ func TestDefaultApiService_GetApplicationProperties(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/application-properties: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1711,7 +1726,7 @@ func TestDefaultApiService_GetArchive(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//archive: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1745,7 +1760,7 @@ func TestDefaultApiService_GetAvatar(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/hooks//avatar: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1780,7 +1795,7 @@ func TestDefaultApiService_GetBranches(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//branches: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1813,7 +1828,7 @@ func TestDefaultApiService_GetChanges(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/changes: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1847,7 +1862,7 @@ func TestDefaultApiService_GetChanges_5(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//changes: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1882,7 +1897,7 @@ func TestDefaultApiService_GetComment(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//comments/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1915,7 +1930,7 @@ func TestDefaultApiService_GetComment_6(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/comments/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1949,7 +1964,7 @@ func TestDefaultApiService_GetComments(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//comments: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1982,7 +1997,7 @@ func TestDefaultApiService_GetComments_7(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/comments: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2016,7 +2031,7 @@ func TestDefaultApiService_GetCommit(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2051,7 +2066,7 @@ func TestDefaultApiService_GetCommits(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//commits: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2085,7 +2100,7 @@ func TestDefaultApiService_GetCommits_8(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/commits: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2120,7 +2135,7 @@ func TestDefaultApiService_GetContent(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//browse: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2154,7 +2169,7 @@ func TestDefaultApiService_GetContent_9(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/browse/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2187,7 +2202,7 @@ func TestDefaultApiService_GetContent_10(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/raw: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2221,7 +2236,7 @@ func TestDefaultApiService_GetContent_11(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/raw/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2254,7 +2269,7 @@ func TestDefaultApiService_GetDefaultBranch(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/branches/default: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2287,7 +2302,7 @@ func TestDefaultApiService_GetForkedRepositories(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos/%7BrepositorySlug%7D/forks: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2320,7 +2335,7 @@ func TestDefaultApiService_GetGroups(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2353,7 +2368,7 @@ func TestDefaultApiService_GetGroupsWithAnyPermission(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2386,7 +2401,7 @@ func TestDefaultApiService_GetGroupsWithAnyPermission_12(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2419,7 +2434,7 @@ func TestDefaultApiService_GetGroupsWithAnyPermission_13(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2452,7 +2467,7 @@ func TestDefaultApiService_GetGroupsWithoutAnyPermission(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/permissions/groups/none: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2485,7 +2500,7 @@ func TestDefaultApiService_GetGroupsWithoutAnyPermission_14(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/groups/none: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2518,7 +2533,7 @@ func TestDefaultApiService_GetGroupsWithoutAnyPermission_15(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/groups/none: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2551,7 +2566,7 @@ func TestDefaultApiService_GetGroups_16(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2584,7 +2599,7 @@ func TestDefaultApiService_GetInformation(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/cluster: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2618,7 +2633,7 @@ func TestDefaultApiService_GetLatestInvocation(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/webhooks/0/latest: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2651,7 +2666,7 @@ func TestDefaultApiService_GetLevel(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/logs/logger/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2684,7 +2699,7 @@ func TestDefaultApiService_GetMailConfig(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/mail-server: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2717,7 +2732,7 @@ func TestDefaultApiService_GetMergeConfig(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/pull-requests/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2752,7 +2767,7 @@ func TestDefaultApiService_GetPullRequestsPage(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2785,7 +2800,7 @@ func TestDefaultApiService_GetProject(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2818,7 +2833,7 @@ func TestDefaultApiService_GetProjectAvatar(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/avatar.png: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2844,6 +2859,7 @@ func TestDefaultApiService_GetProjects(t *testing.T) { type args struct { localVarOptionals map[string]interface{} } + tests := []struct { name string fields fields @@ -2851,7 +2867,8 @@ func TestDefaultApiService_GetProjects(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + // Network errors + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{localVarOptionals: map[string]interface{}{}}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2884,7 +2901,7 @@ func TestDefaultApiService_GetPullRequestCount(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/inbox/pull-requests/count: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2917,7 +2934,7 @@ func TestDefaultApiService_GetPullRequestSettings(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/pull-requests: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2950,7 +2967,7 @@ func TestDefaultApiService_GetPullRequestSettings_17(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/pull-requests/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -2983,7 +3000,7 @@ func TestDefaultApiService_GetPullRequestSuggestions(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/dashboard/pull-request-suggestions: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3016,7 +3033,7 @@ func TestDefaultApiService_GetPullRequestTasks(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/tasks: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3049,7 +3066,7 @@ func TestDefaultApiService_GetPullRequests(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/dashboard/pull-requests: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3082,7 +3099,7 @@ func TestDefaultApiService_GetPullRequests_18(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/inbox/pull-requests: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3115,7 +3132,7 @@ func TestDefaultApiService_GetRelatedRepositories(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos/%7BrepositorySlug%7D/related: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3148,7 +3165,7 @@ func TestDefaultApiService_GetRepositories(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3182,7 +3199,7 @@ func TestDefaultApiService_GetRepositoriesWithOptions(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3215,7 +3232,7 @@ func TestDefaultApiService_GetRepositoriesRecentlyAccessed(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/profile/recent/repos: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3248,7 +3265,7 @@ func TestDefaultApiService_GetRepositories_19(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/repos: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3282,7 +3299,7 @@ func TestDefaultApiService_GetRepository(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3316,7 +3333,7 @@ func TestDefaultApiService_GetUserRepository(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/users//repos/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3351,7 +3368,7 @@ func TestDefaultApiService_GetPullRequest(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3386,7 +3403,7 @@ func TestDefaultApiService_GetPullRequestActivity(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0/activities: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3421,7 +3438,7 @@ func TestDefaultApiService_GetPullRequestCommits(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0/commits: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3457,7 +3474,7 @@ func TestDefaultApiService_GetPullRequestCommitsWithOptions(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0/commits: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3490,7 +3507,7 @@ func TestDefaultApiService_GetCommitBuildStatuses(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/build-status/1.0/commits/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3523,7 +3540,7 @@ func TestDefaultApiService_GetRepositoryHook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/hooks/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3556,7 +3573,7 @@ func TestDefaultApiService_GetRepositoryHook_20(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/hooks/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3589,7 +3606,7 @@ func TestDefaultApiService_GetRepositoryHooks(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/hooks: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3622,7 +3639,7 @@ func TestDefaultApiService_GetRepositoryHooks_21(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/hooks: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3655,7 +3672,7 @@ func TestDefaultApiService_GetRootLevel(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/logs/rootLogger: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3688,7 +3705,7 @@ func TestDefaultApiService_GetSenderAddress(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/mail-server/sender-address: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3721,7 +3738,7 @@ func TestDefaultApiService_GetSettings(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/hooks//settings: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3754,7 +3771,7 @@ func TestDefaultApiService_GetSettings_22(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/hooks//settings: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3788,7 +3805,7 @@ func TestDefaultApiService_GetStatistics(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/webhooks/0/statistics: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3821,7 +3838,7 @@ func TestDefaultApiService_GetStatisticsSummary(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/webhooks/0/statistics/summary: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3854,7 +3871,7 @@ func TestDefaultApiService_GetTag(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/tags/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3889,7 +3906,7 @@ func TestDefaultApiService_GetTags(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//tags: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3922,7 +3939,7 @@ func TestDefaultApiService_GetTask(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/tasks/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3955,7 +3972,7 @@ func TestDefaultApiService_GetSSHKeys(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/ssh/1.0/keys: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -3988,7 +4005,7 @@ func TestDefaultApiService_CreateSSHKey(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/ssh/1.0/keys: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4021,7 +4038,7 @@ func TestDefaultApiService_GetUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/users/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4054,7 +4071,7 @@ func TestDefaultApiService_GetUserSettings(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/users/%7BuserSlug%7D/settings: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4087,7 +4104,7 @@ func TestDefaultApiService_GetUsers(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4120,7 +4137,7 @@ func TestDefaultApiService_GetUsersWithAnyPermission(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4153,7 +4170,7 @@ func TestDefaultApiService_GetUsersWithAnyPermission_23(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4186,7 +4203,7 @@ func TestDefaultApiService_GetUsersWithAnyPermission_24(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4219,7 +4236,7 @@ func TestDefaultApiService_GetUsersWithoutAnyPermission(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/admin/permissions/users/none: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4252,7 +4269,7 @@ func TestDefaultApiService_GetUsersWithoutPermission(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/users/none: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4285,7 +4302,7 @@ func TestDefaultApiService_GetUsersWithoutPermission_25(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/users/none: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4318,7 +4335,7 @@ func TestDefaultApiService_GetUsers_26(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4352,7 +4369,7 @@ func TestDefaultApiService_GetWebhook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/webhooks/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4385,7 +4402,7 @@ func TestDefaultApiService_Get_27(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4418,7 +4435,7 @@ func TestDefaultApiService_HasAllUserPermission(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions//all: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4451,7 +4468,7 @@ func TestDefaultApiService_ListParticipants(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/participants: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4489,7 +4506,7 @@ func TestDefaultApiService_Merge(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos//pull-requests/0/merge: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4523,7 +4540,7 @@ func TestDefaultApiService_ModifyAllUserPermission(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions//all: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4556,7 +4573,7 @@ func TestDefaultApiService_Preview(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/markup/preview: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4589,7 +4606,7 @@ func TestDefaultApiService_RemoveGroupFromUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/users/remove-group: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4622,7 +4639,7 @@ func TestDefaultApiService_RemoveUserFromGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/groups/remove-user: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4655,7 +4672,7 @@ func TestDefaultApiService_RenameUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/users/rename: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4689,7 +4706,7 @@ func TestDefaultApiService_Reopen(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/reopen: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4722,7 +4739,7 @@ func TestDefaultApiService_RetryCreateRepository(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects//repos/%7BrepositorySlug%7D/recreate: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4755,7 +4772,7 @@ func TestDefaultApiService_RevokePermissionsForGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/admin/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4788,7 +4805,7 @@ func TestDefaultApiService_RevokePermissionsForGroup_28(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4821,7 +4838,7 @@ func TestDefaultApiService_RevokePermissionsForGroup_29(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4854,7 +4871,7 @@ func TestDefaultApiService_RevokePermissionsForUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/admin/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4887,7 +4904,7 @@ func TestDefaultApiService_RevokePermissionsForUser_30(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4920,7 +4937,7 @@ func TestDefaultApiService_RevokePermissionsForUser_31(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4953,7 +4970,7 @@ func TestDefaultApiService_Search(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/participants: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4986,7 +5003,7 @@ func TestDefaultApiService_SetDefaultBranch(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/branches/default: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5020,7 +5037,7 @@ func TestDefaultApiService_SetLevel(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/logs/logger//: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5053,7 +5070,7 @@ func TestDefaultApiService_SetMailConfig(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/admin/mail-server: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5086,7 +5103,7 @@ func TestDefaultApiService_SetMergeConfig(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/pull-requests/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5119,7 +5136,7 @@ func TestDefaultApiService_SetPermissionForGroup(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5152,7 +5169,7 @@ func TestDefaultApiService_SetPermissionForGroups(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/admin/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5185,7 +5202,7 @@ func TestDefaultApiService_SetPermissionForGroups_32(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/groups: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5218,7 +5235,7 @@ func TestDefaultApiService_SetPermissionForUser(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5251,7 +5268,7 @@ func TestDefaultApiService_SetPermissionForUsers(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/admin/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5284,7 +5301,7 @@ func TestDefaultApiService_SetPermissionForUsers_33(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/permissions/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5317,7 +5334,7 @@ func TestDefaultApiService_SetRootLevel(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/logs/rootLogger/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5350,7 +5367,7 @@ func TestDefaultApiService_SetSenderAddress(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/admin/mail-server/sender-address: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5383,7 +5400,7 @@ func TestDefaultApiService_SetSettings(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/hooks//settings: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5416,7 +5433,7 @@ func TestDefaultApiService_SetSettings_34(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/hooks//settings: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5449,7 +5466,7 @@ func TestDefaultApiService_Stream(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/last-modified: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5482,7 +5499,7 @@ func TestDefaultApiService_StreamChanges(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/compare/changes: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5515,7 +5532,7 @@ func TestDefaultApiService_StreamChanges_35(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/changes: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5550,7 +5567,7 @@ func TestDefaultApiService_StreamCommits(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//compare/commits: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5584,7 +5601,7 @@ func TestDefaultApiService_StreamDiff(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//diff: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5620,7 +5637,7 @@ func TestDefaultApiService_StreamDiff_36(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//diff/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5656,7 +5673,7 @@ func TestDefaultApiService_StreamDiff_37(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects//repos//compare/diff: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5689,7 +5706,7 @@ func TestDefaultApiService_StreamDiff_38(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/diff: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5723,7 +5740,7 @@ func TestDefaultApiService_StreamDiff_39(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/diff/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5756,7 +5773,7 @@ func TestDefaultApiService_StreamDiff_40(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/diff: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5790,7 +5807,7 @@ func TestDefaultApiService_StreamDiff_41(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/diff/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5823,7 +5840,7 @@ func TestDefaultApiService_StreamFiles(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/files: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5857,7 +5874,7 @@ func TestDefaultApiService_StreamFiles_42(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/files/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5891,7 +5908,7 @@ func TestDefaultApiService_Stream_43(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Get https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/last-modified/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5924,7 +5941,7 @@ func TestWebhook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/webhooks/test: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5958,7 +5975,7 @@ func TestDefaultApiService_UnassignParticipantRole(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/participants: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -5993,7 +6010,7 @@ func TestDefaultApiService_UnassignParticipantRole_44(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/participants/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6026,7 +6043,7 @@ func TestDefaultApiService_Unwatch(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//watch: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6059,7 +6076,7 @@ func TestDefaultApiService_Unwatch_45(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/watch: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6092,7 +6109,7 @@ func TestDefaultApiService_Update(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/license: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6127,7 +6144,7 @@ func TestDefaultApiService_UpdateComment(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//comments/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6160,7 +6177,7 @@ func TestDefaultApiService_UpdateComment_46(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/%7BpullRequestId%7D/comments/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6193,7 +6210,7 @@ func TestDefaultApiService_UpdateProject(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6226,7 +6243,7 @@ func TestDefaultApiService_UpdatePullRequestSettings(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/settings/pull-requests: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6259,7 +6276,7 @@ func TestDefaultApiService_UpdatePullRequestSettings_47(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/settings/pull-requests/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6293,7 +6310,7 @@ func TestDefaultApiService_UpdateRepository(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects//repos/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6329,7 +6346,7 @@ func TestDefaultApiService_UpdateRepositoryWithOptions(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects//repos/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6362,7 +6379,7 @@ func TestDefaultApiService_UpdateSettings(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/users/%7BuserSlug%7D/settings: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6397,7 +6414,7 @@ func TestDefaultApiService_UpdateStatus(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/participants/: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6430,7 +6447,7 @@ func TestDefaultApiService_UpdateTask(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/tasks/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6463,7 +6480,7 @@ func TestDefaultApiService_UpdateUserDetails(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/admin/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6496,7 +6513,7 @@ func TestDefaultApiService_UpdateUserDetails_48(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/users: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6529,7 +6546,7 @@ func TestDefaultApiService_UpdateUserPassword(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/admin/users/credentials: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6562,7 +6579,7 @@ func TestDefaultApiService_UpdateUserPassword_49(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/users/credentials: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6599,7 +6616,7 @@ func TestDefaultApiService_UpdateWebhook(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects//repos//webhooks/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6632,7 +6649,7 @@ func TestDefaultApiService_Update_50(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Put https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6665,7 +6682,7 @@ func TestDefaultApiService_UploadAvatar(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/avatar.png: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6698,7 +6715,7 @@ func TestDefaultApiService_UploadAvatar_51(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/users/%7BuserSlug%7D/avatar.png: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6731,7 +6748,7 @@ func TestDefaultApiService_Watch(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/commits//watch: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6764,7 +6781,7 @@ func TestDefaultApiService_Watch_52(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/watch: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -6797,7 +6814,7 @@ func TestDefaultApiService_WithdrawApproval(t *testing.T) { want *APIResponse wantErr bool }{ - // TODO: Add test cases. + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Delete https://stash.domain.com/rest/api/1.0/projects/%7BprojectKey%7D/repos/%7BrepositorySlug%7D/pull-requests/0/approve: context canceled"}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {