summaryrefslogtreecommitdiffstats
path: root/api4/file_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-11-09 14:46:20 -0600
committerGitHub <noreply@github.com>2017-11-09 14:46:20 -0600
commit10c5a927cb619f1aa2a599cbe3667820f4766bda (patch)
treef415540ab66115e62928d304c99b533398d7f226 /api4/file_test.go
parentb0c18ece0988b1573b2286bb73b32e48a1d8c59a (diff)
downloadchat-10c5a927cb619f1aa2a599cbe3667820f4766bda.tar.gz
chat-10c5a927cb619f1aa2a599cbe3667820f4766bda.tar.bz2
chat-10c5a927cb619f1aa2a599cbe3667820f4766bda.zip
more global config ref cleanup (#7802)
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)
}