diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /integrations/attachment_test.go | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'integrations/attachment_test.go')
-rw-r--r-- | integrations/attachment_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/integrations/attachment_test.go b/integrations/attachment_test.go index 481104d73f..25243feb3c 100644 --- a/integrations/attachment_test.go +++ b/integrations/attachment_test.go @@ -32,7 +32,7 @@ func generateImg() bytes.Buffer { func createAttachment(t *testing.T, session *TestSession, repoURL, filename string, buff bytes.Buffer, expectedStatus int) string { body := &bytes.Buffer{} - //Setup multi-part + // Setup multi-part writer := multipart.NewWriter(body) part, err := writer.CreateFormFile("file", filename) assert.NoError(t, err) @@ -86,7 +86,7 @@ func TestCreateIssueAttachment(t *testing.T) { resp = session.MakeRequest(t, req, http.StatusFound) test.RedirectURL(resp) // check that redirect URL exists - //Validate that attachment is available + // Validate that attachment is available req = NewRequest(t, "GET", "/attachments/"+uuid) session.MakeRequest(t, req, http.StatusOK) } @@ -120,12 +120,12 @@ func TestGetAttachment(t *testing.T) { } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - //Write empty file to be available for response + // Write empty file to be available for response if tc.createFile { _, err := storage.Attachments.Save(repo_model.AttachmentRelativePath(tc.uuid), strings.NewReader("hello world"), -1) assert.NoError(t, err) } - //Actual test + // Actual test req := NewRequest(t, "GET", "/attachments/"+tc.uuid) tc.session.MakeRequest(t, req, tc.want) }) |