summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-07-29 16:59:26 +0200
committerGitHub <noreply@github.com>2019-07-29 16:59:26 +0200
commite21f4409909ae13f1a6f4f0328eb2ab4fa85b16b (patch)
treecc35a50ead4b0ddaa0ba343f0719825752e1a7d8 /tests
parent8d8766d5a7b51a01d1c90bb237e1cbdd44f46bfc (diff)
parente43b341b04c5e13424f2d833803c0e444f8ab3b2 (diff)
downloadnextcloud-server-e21f4409909ae13f1a6f4f0328eb2ab4fa85b16b.tar.gz
nextcloud-server-e21f4409909ae13f1a6f4f0328eb2ab4fa85b16b.zip
Merge pull request #16502 from nextcloud/bugfix/16474
Check the if we can actually access the storage cache for recent files
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/Node/FolderTest.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php
index daac67cae23..3390d19feb7 100644
--- a/tests/lib/Files/Node/FolderTest.php
+++ b/tests/lib/Files/Node/FolderTest.php
@@ -810,13 +810,15 @@ class FolderTest extends NodeTest {
'storage_mtime' => $baseTime,
'mtime' => $baseTime,
'mimetype' => 'text/plain',
- 'size' => 3
+ 'size' => 3,
+ 'permissions' => \OCP\Constants::PERMISSION_ALL
]);
$id2 = $cache->put('bar/foo/old.txt', [
'storage_mtime' => $baseTime - 100,
'mtime' => $baseTime - 100,
'mimetype' => 'text/plain',
- 'size' => 3
+ 'size' => 3,
+ 'permissions' => \OCP\Constants::PERMISSION_READ
]);
$cache->put('bar/asd/outside.txt', [
'storage_mtime' => $baseTime,
@@ -828,7 +830,8 @@ class FolderTest extends NodeTest {
'storage_mtime' => $baseTime - 600,
'mtime' => $baseTime - 600,
'mimetype' => 'text/plain',
- 'size' => 3
+ 'size' => 3,
+ 'permissions' => \OCP\Constants::PERMISSION_ALL
]);
$node = new \OC\Files\Node\Folder($root, $view, $folderPath, $folderInfo);
@@ -871,21 +874,24 @@ class FolderTest extends NodeTest {
'storage_mtime' => $baseTime,
'mtime' => $baseTime,
'mimetype' => \OCP\Files\FileInfo::MIMETYPE_FOLDER,
- 'size' => 3
+ 'size' => 3,
+ 'permissions' => 0
]);
$id2 = $cache->put('bar/foo/folder/bar.txt', [
'storage_mtime' => $baseTime,
'mtime' => $baseTime,
'mimetype' => 'text/plain',
'size' => 3,
- 'parent' => $id1
+ 'parent' => $id1,
+ 'permissions' => \OCP\Constants::PERMISSION_ALL
]);
$id3 = $cache->put('bar/foo/folder/asd.txt', [
'storage_mtime' => $baseTime - 100,
'mtime' => $baseTime - 100,
'mimetype' => 'text/plain',
'size' => 3,
- 'parent' => $id1
+ 'parent' => $id1,
+ 'permissions' => \OCP\Constants::PERMISSION_ALL
]);
$node = new \OC\Files\Node\Folder($root, $view, $folderPath, $folderInfo);
@@ -934,7 +940,8 @@ class FolderTest extends NodeTest {
'storage_mtime' => $baseTime,
'mtime' => $baseTime,
'mimetype' => 'text/plain',
- 'size' => 3
+ 'size' => 3,
+ 'permissions' => \OCP\Constants::PERMISSION_ALL
]);
$cache->put('outside.txt', [
'storage_mtime' => $baseTime - 100,