mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 14:07:20 +00:00
Enable addtional linters (#34085)
enable mirror, usestdlibbars and perfsprint part of: https://github.com/go-gitea/gitea/issues/34083 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
auth_model "code.gitea.io/gitea/models/auth"
|
||||
@ -130,7 +131,7 @@ func TestEmptyRepoUploadFile(t *testing.T) {
|
||||
mpForm := multipart.NewWriter(body)
|
||||
_ = mpForm.WriteField("_csrf", GetUserCSRFToken(t, session))
|
||||
file, _ := mpForm.CreateFormFile("file", "uploaded-file.txt")
|
||||
_, _ = io.Copy(file, bytes.NewBufferString("newly-uploaded-test-file"))
|
||||
_, _ = io.Copy(file, strings.NewReader("newly-uploaded-test-file"))
|
||||
_ = mpForm.Close()
|
||||
|
||||
req = NewRequestWithBody(t, "POST", "/user30/empty/upload-file", body)
|
||||
|
Reference in New Issue
Block a user