summaryrefslogtreecommitdiffstats
path: root/api4/file_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/file_test.go')
-rw-r--r--api4/file_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/api4/file_test.go b/api4/file_test.go
index 394406d6e..7010b3039 100644
--- a/api4/file_test.go
+++ b/api4/file_test.go
@@ -10,7 +10,6 @@ import (
"testing"
"time"
- "github.com/mattermost/mattermost-server/app"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/store"
)
@@ -94,7 +93,7 @@ func TestUploadFile(t *testing.T) {
// Wait a bit for files to ready
time.Sleep(2 * time.Second)
- if err := cleanupTestFile(info); err != nil {
+ if err := th.cleanupTestFile(info); err != nil {
t.Fatal(err)
}
@@ -363,7 +362,7 @@ func TestGetFileLink(t *testing.T) {
if result := <-th.App.Srv.Store.FileInfo().Get(fileId); result.Err != nil {
t.Fatal(result.Err)
} else {
- cleanupTestFile(result.Data.(*model.FileInfo))
+ th.cleanupTestFile(result.Data.(*model.FileInfo))
}
}
@@ -520,7 +519,7 @@ func TestGetPublicFile(t *testing.T) {
result := <-th.App.Srv.Store.FileInfo().Get(fileId)
info := result.Data.(*model.FileInfo)
- link := app.GeneratePublicLink(Client.Url, info)
+ link := th.App.GeneratePublicLink(Client.Url, info)
// Wait a bit for files to ready
time.Sleep(2 * time.Second)
@@ -551,9 +550,9 @@ func TestGetPublicFile(t *testing.T) {
t.Fatal("should've failed to get image with public link after salt changed")
}
- if err := cleanupTestFile(store.Must(th.App.Srv.Store.FileInfo().Get(fileId)).(*model.FileInfo)); err != nil {
+ if err := th.cleanupTestFile(store.Must(th.App.Srv.Store.FileInfo().Get(fileId)).(*model.FileInfo)); err != nil {
t.Fatal(err)
}
- cleanupTestFile(info)
+ th.cleanupTestFile(info)
}