[MM-10621] Set createAt timestamp on file upload api call to secure upload order of files (#9170)

* set createAt timestamp on file upload api call to secure upload order of files

* fix test on plugin hooks
Этот коммит содержится в:
Saturnino Abril
2018-07-28 14:27:55 +08:00
коммит произвёл GitHub
родитель 6ac82d5171
Коммит 51dc5fa36e
3 изменённых файлов: 18 добавлений и 5 удалений

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

@@ -11,6 +11,7 @@ import (
"os/exec"
"path/filepath"
"testing"
"time"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/plugin"
@@ -352,6 +353,7 @@ func TestHookFileWillBeUploaded(t *testing.T) {
[]io.ReadCloser{ioutil.NopCloser(bytes.NewBufferString("inputfile"))},
[]string{"testhook.txt"},
[]string{},
time.Now(),
)
assert.Nil(t, err)
assert.NotNil(t, response)