mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Test ignore migration rate limitation error (#12715)
This commit is contained in:
		@@ -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)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user