Browse Source

Test ignore migration rate limitation error (#12715)

for-closed-social
6543 4 years ago
committed by GitHub
parent
commit
fb603825f5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      integrations/api_repo_test.go

+ 10
- 1
integrations/api_repo_test.go View File

@ -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)
}
}
}

Loading…
Cancel
Save