Skip to content

Commit a995eb2

Browse files
committed
Test ignore migration rate limitation error
1 parent ca81b65 commit a995eb2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

integrations/api_repo_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,16 @@ func TestAPIRepoMigrate(t *testing.T) {
321321
UID: int(testCase.userID),
322322
RepoName: testCase.repoName,
323323
})
324-
session.MakeRequest(t, req, testCase.expectedStatus)
324+
resp := MakeRequest(t, req, NoExpectedStatus)
325+
if resp.Code == http.StatusUnprocessableEntity {
326+
respJSON := map[string]string{}
327+
DecodeJSON(t, resp, &respJSON)
328+
if assert.Equal(t, respJSON["message"], "Remote visit addressed rate limitation.") {
329+
t.Log("test hit github rate limitation")
330+
}
331+
} else {
332+
assert.EqualValues(t, testCase.expectedStatus, resp.Code)
333+
}
325334
}
326335
}
327336

0 commit comments

Comments
 (0)