Reorganize file util functionality (#7848)

* reorganize file util functionality

* fix api test compilation

* fix rebase issue
Этот коммит содержится в:
Chris
2017-11-16 15:04:27 -06:00
коммит произвёл Jonathan
родитель ef69d93abf
Коммит eb1a00ef5f
22 изменённых файлов: 649 добавлений и 619 удалений

Просмотреть файл

@@ -9,7 +9,6 @@ import (
"time"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
func TestGeneratePublicLinkHash(t *testing.T) {
@@ -51,7 +50,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info1.Id)
utils.RemoveFile(info1.Path)
th.App.RemoveFile(info1.Path)
}()
}
@@ -65,7 +64,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info2.Id)
utils.RemoveFile(info2.Path)
th.App.RemoveFile(info2.Path)
}()
}
@@ -79,7 +78,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info3.Id)
utils.RemoveFile(info3.Path)
th.App.RemoveFile(info3.Path)
}()
}
@@ -93,7 +92,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info3.Id)
utils.RemoveFile(info3.Path)
th.App.RemoveFile(info3.Path)
}()
}