mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Fix delete nonexist oauth application 500 and prevent deadlock (#15384)
* Fix delete nonexist oauth application 500 * Fix test * Close the session Signed-off-by: Andrew Thornton <art27@cantab.net> * Update integrations/api_oauth2_apps_test.go * Fix more missed sess.Close * Remove unnecessary blank line Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		| @@ -92,6 +92,10 @@ func testAPIDeleteOAuth2Application(t *testing.T) { | ||||
| 	session.MakeRequest(t, req, http.StatusNoContent) | ||||
|  | ||||
| 	models.AssertNotExistsBean(t, &models.OAuth2Application{UID: oldApp.UID, Name: oldApp.Name}) | ||||
|  | ||||
| 	// Delete again will return not found | ||||
| 	req = NewRequest(t, "DELETE", urlStr) | ||||
| 	session.MakeRequest(t, req, http.StatusNotFound) | ||||
| } | ||||
|  | ||||
| func testAPIGetOAuth2Application(t *testing.T) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lunny Xiao
					Lunny Xiao