[MM-44489] Cloud limits: enforcing files (#20703)
* Update last accessible file time * Filter fileInfos * Set inaccessible header * Fix lint issue * Fix lint issue * Fix i18n * add nil check * Fix merge conflicts * Add helper functions to clear out inaccessible files content * Remove content for inaccessible files * Fix typo * wip * Remove InaccessibleContent field, instead use Archived * Add store tests * Add tests * Add separate funcs to ignore cloud limits * Use separate query for MySql * Use GetReplicaX Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -219,7 +219,7 @@ func TestAttachFilesToPost(t *testing.T) {
|
||||
appErr := th.App.attachFilesToPost(post)
|
||||
assert.Nil(t, appErr)
|
||||
|
||||
infos, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
|
||||
infos, _, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
|
||||
assert.Nil(t, appErr)
|
||||
assert.Len(t, infos, 2)
|
||||
})
|
||||
@@ -247,7 +247,7 @@ func TestAttachFilesToPost(t *testing.T) {
|
||||
appErr := th.App.attachFilesToPost(post)
|
||||
assert.Nil(t, appErr)
|
||||
|
||||
infos, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
|
||||
infos, _, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
|
||||
assert.Nil(t, appErr)
|
||||
assert.Len(t, infos, 1)
|
||||
assert.Equal(t, info2.Id, infos[0].Id)
|
||||
|
||||
Ссылка в новой задаче
Block a user