diff options
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/api_repo_file_content_test.go | 3 | ||||
-rw-r--r-- | integrations/api_repo_file_create_test.go | 3 | ||||
-rw-r--r-- | integrations/api_repo_file_delete_test.go | 4 | ||||
-rw-r--r-- | integrations/api_repo_file_update_test.go | 3 |
4 files changed, 5 insertions, 8 deletions
diff --git a/integrations/api_repo_file_content_test.go b/integrations/api_repo_file_content_test.go index 896d811083..7a6025d423 100644 --- a/integrations/api_repo_file_content_test.go +++ b/integrations/api_repo_file_content_test.go @@ -11,7 +11,6 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -98,7 +97,7 @@ func testAPIGetFileContents(t *testing.T, u *url.URL) { resp = session.MakeRequest(t, req, http.StatusInternalServerError) expectedAPIError := context.APIError{ Message: "object does not exist [id: " + branch + ", rel_path: ]", - URL: base.DocURL, + URL: setting.API.SwaggerURL, } var apiError context.APIError DecodeJSON(t, resp, &apiError) diff --git a/integrations/api_repo_file_create_test.go b/integrations/api_repo_file_create_test.go index 3bb2ecb812..973ed9dfa5 100644 --- a/integrations/api_repo_file_create_test.go +++ b/integrations/api_repo_file_create_test.go @@ -13,7 +13,6 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" @@ -160,7 +159,7 @@ func TestAPICreateFile(t *testing.T) { resp = session.MakeRequest(t, req, http.StatusInternalServerError) expectedAPIError := context.APIError{ Message: "repository file already exists [path: " + treePath + "]", - URL: base.DocURL, + URL: setting.API.SwaggerURL, } var apiError context.APIError DecodeJSON(t, resp, &apiError) diff --git a/integrations/api_repo_file_delete_test.go b/integrations/api_repo_file_delete_test.go index e9029a669b..2f5f9028a8 100644 --- a/integrations/api_repo_file_delete_test.go +++ b/integrations/api_repo_file_delete_test.go @@ -11,8 +11,8 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "github.com/stretchr/testify/assert" @@ -102,7 +102,7 @@ func TestAPIDeleteFile(t *testing.T) { resp = session.MakeRequest(t, req, http.StatusInternalServerError) expectedAPIError := context.APIError{ Message: "sha does not match [given: " + deleteFileOptions.SHA + ", expected: " + correctSHA + "]", - URL: base.DocURL, + URL: setting.API.SwaggerURL, } var apiError context.APIError DecodeJSON(t, resp, &apiError) diff --git a/integrations/api_repo_file_update_test.go b/integrations/api_repo_file_update_test.go index eab7090df6..90fecf59d0 100644 --- a/integrations/api_repo_file_update_test.go +++ b/integrations/api_repo_file_update_test.go @@ -13,7 +13,6 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" @@ -173,7 +172,7 @@ func TestAPIUpdateFile(t *testing.T) { resp = session.MakeRequest(t, req, http.StatusInternalServerError) expectedAPIError := context.APIError{ Message: "sha does not match [given: " + updateFileOptions.SHA + ", expected: " + correctSHA + "]", - URL: base.DocURL, + URL: setting.API.SwaggerURL, } var apiError context.APIError DecodeJSON(t, resp, &apiError) |