mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Update HTTP status codes to modern codes (#18063)
* 2xx/3xx/4xx/5xx -> http.Status... * http.StatusFound -> http.StatusTemporaryRedirect * http.StatusMovedPermanently -> http.StatusPermanentRedirect
This commit is contained in:
		@@ -42,7 +42,7 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo, pullnum strin
 | 
			
		||||
		"_csrf": htmlDoc.GetCSRF(),
 | 
			
		||||
		"do":    string(mergeStyle),
 | 
			
		||||
	})
 | 
			
		||||
	resp = session.MakeRequest(t, req, http.StatusFound)
 | 
			
		||||
	resp = session.MakeRequest(t, req, http.StatusSeeOther)
 | 
			
		||||
 | 
			
		||||
	return resp
 | 
			
		||||
}
 | 
			
		||||
@@ -220,7 +220,7 @@ func TestCantMergeConflict(t *testing.T) {
 | 
			
		||||
			Base:  "base",
 | 
			
		||||
			Title: "create a conflicting pr",
 | 
			
		||||
		})
 | 
			
		||||
		session.MakeRequest(t, req, 201)
 | 
			
		||||
		session.MakeRequest(t, req, http.StatusCreated)
 | 
			
		||||
 | 
			
		||||
		// Now this PR will be marked conflict - or at least a race will do - so drop down to pure code at this point...
 | 
			
		||||
		user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{
 | 
			
		||||
@@ -330,7 +330,7 @@ func TestCantMergeUnrelated(t *testing.T) {
 | 
			
		||||
			Base:  "base",
 | 
			
		||||
			Title: "create an unrelated pr",
 | 
			
		||||
		})
 | 
			
		||||
		session.MakeRequest(t, req, 201)
 | 
			
		||||
		session.MakeRequest(t, req, http.StatusCreated)
 | 
			
		||||
 | 
			
		||||
		// Now this PR could be marked conflict - or at least a race may occur - so drop down to pure code at this point...
 | 
			
		||||
		gitRepo, err := git.OpenRepository(path)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user