summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-04 19:28:36 +0200
committerGitHub <noreply@github.com>2020-09-04 13:28:36 -0400
commitfb603825f5660b2799a4b45526a708c9a3de16b6 (patch)
tree6634b37ab3370b67f85d6d6cebe0ff6e1ee6a834
parentca81b6528b697f1bef802558c55aeea1028f3a8c (diff)
downloadgitea-fb603825f5660b2799a4b45526a708c9a3de16b6.tar.gz
gitea-fb603825f5660b2799a4b45526a708c9a3de16b6.zip
Test ignore migration rate limitation error (#12715)
-rw-r--r--integrations/api_repo_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/integrations/api_repo_test.go b/integrations/api_repo_test.go
index 0d0d4a117b..9d3599102a 100644
--- a/integrations/api_repo_test.go
+++ b/integrations/api_repo_test.go
@@ -321,7 +321,16 @@ func TestAPIRepoMigrate(t *testing.T) {
UID: int(testCase.userID),
RepoName: testCase.repoName,
})
- session.MakeRequest(t, req, testCase.expectedStatus)
+ resp := MakeRequest(t, req, NoExpectedStatus)
+ if resp.Code == http.StatusUnprocessableEntity {
+ respJSON := map[string]string{}
+ DecodeJSON(t, resp, &respJSON)
+ if assert.Equal(t, respJSON["message"], "Remote visit addressed rate limitation.") {
+ t.Log("test hit github rate limitation")
+ }
+ } else {
+ assert.EqualValues(t, testCase.expectedStatus, resp.Code)
+ }
}
}