Skip to content

Commit

Permalink
Fix missing defer prepareTestEnv(t)() on some tests (go-gitea#9906)
Browse files Browse the repository at this point in the history
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: zeripath <[email protected]>
  • Loading branch information
3 people authored and sapk committed Jan 21, 2020
1 parent 3f1c897 commit 8da863e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integrations/attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ func createAttachment(t *testing.T, session *TestSession, repoURL, filename stri
}

func TestCreateAnonymousAttachment(t *testing.T) {
prepareTestEnv(t)
defer prepareTestEnv(t)()
session := emptyTestSession(t)
createAttachment(t, session, "user2/repo1", "image.png", generateImg(), http.StatusFound)
}

func TestCreateIssueAttachment(t *testing.T) {
prepareTestEnv(t)
defer prepareTestEnv(t)()
const repoURL = "user2/repo1"
session := loginUser(t, "user2")
uuid := createAttachment(t, session, repoURL, "image.png", generateImg(), http.StatusOK)
Expand Down Expand Up @@ -93,7 +93,7 @@ func TestCreateIssueAttachment(t *testing.T) {
}

func TestGetAttachment(t *testing.T) {
prepareTestEnv(t)
defer prepareTestEnv(t)()
adminSession := loginUser(t, "user1")
user2Session := loginUser(t, "user2")
user8Session := loginUser(t, "user8")
Expand Down

0 comments on commit 8da863e

Please sign in to comment.