Skip to content

Commit 8da863e

Browse files
guillep2klunnyzeripath
authored andcommitted
Fix missing defer prepareTestEnv(t)() on some tests (#9906)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
1 parent 3f1c897 commit 8da863e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

integrations/attachment_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ func createAttachment(t *testing.T, session *TestSession, repoURL, filename stri
5858
}
5959

6060
func TestCreateAnonymousAttachment(t *testing.T) {
61-
prepareTestEnv(t)
61+
defer prepareTestEnv(t)()
6262
session := emptyTestSession(t)
6363
createAttachment(t, session, "user2/repo1", "image.png", generateImg(), http.StatusFound)
6464
}
6565

6666
func TestCreateIssueAttachment(t *testing.T) {
67-
prepareTestEnv(t)
67+
defer prepareTestEnv(t)()
6868
const repoURL = "user2/repo1"
6969
session := loginUser(t, "user2")
7070
uuid := createAttachment(t, session, repoURL, "image.png", generateImg(), http.StatusOK)
@@ -93,7 +93,7 @@ func TestCreateIssueAttachment(t *testing.T) {
9393
}
9494

9595
func TestGetAttachment(t *testing.T) {
96-
prepareTestEnv(t)
96+
defer prepareTestEnv(t)()
9797
adminSession := loginUser(t, "user1")
9898
user2Session := loginUser(t, "user2")
9999
user8Session := loginUser(t, "user8")

0 commit comments

Comments
 (0)