summaryrefslogtreecommitdiffstats
path: root/integrations/attachment_test.go
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2020-01-21 08:40:21 -0300
committerAntoine GIRARD <sapk@users.noreply.github.com>2020-01-21 12:40:21 +0100
commit8da863ed1551b35eaee2062f7f436ac0fc1703a8 (patch)
tree5f83a3fd59f2665968e42b35792191506b579edf /integrations/attachment_test.go
parent3f1c8970ec27a448ea861f208a38b8ceef1d4610 (diff)
downloadgitea-8da863ed1551b35eaee2062f7f436ac0fc1703a8.tar.gz
gitea-8da863ed1551b35eaee2062f7f436ac0fc1703a8.zip
Fix missing defer prepareTestEnv(t)() on some tests (#9906)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'integrations/attachment_test.go')
-rw-r--r--integrations/attachment_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/attachment_test.go b/integrations/attachment_test.go
index 746256df95..7fd3aa3bf3 100644
--- a/integrations/attachment_test.go
+++ b/integrations/attachment_test.go
@@ -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)
@@ -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")