aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Cache/CacheTest.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-07-31 18:41:11 +0200
committerLouis Chemineau <louis@chmn.me>2024-08-28 10:21:19 +0200
commit62f8b6517f4492b220ebd9df415f2b134735768b (patch)
tree4b1bee39c02d7f2cfeb7c975e4be88579ff3d932 /tests/lib/Files/Cache/CacheTest.php
parentf5b348674449d023367b5e5f84cb4ac1de98605b (diff)
downloadnextcloud-server-62f8b6517f4492b220ebd9df415f2b134735768b.tar.gz
nextcloud-server-62f8b6517f4492b220ebd9df415f2b134735768b.zip
feat: implement distributing partitioned queries over multiple shards
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Files/Cache/CacheTest.php')
-rw-r--r--tests/lib/Files/Cache/CacheTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php
index 193d170bb6d..9f6d7080757 100644
--- a/tests/lib/Files/Cache/CacheTest.php
+++ b/tests/lib/Files/Cache/CacheTest.php
@@ -483,6 +483,23 @@ class CacheTest extends \Test\TestCase {
}
}
+ public function testMoveFromCache() {
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/bar'];
+ $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
+
+ $this->cache2->put("folder", $folderData);
+ $this->cache2->put("folder/sub", $data);
+
+
+ $this->cache->moveFromCache($this->cache2, "folder", "targetfolder");
+
+ $this->assertFalse($this->cache2->inCache("folder"));
+ $this->assertFalse($this->cache2->inCache("folder/sub"));
+
+ $this->assertTrue($this->cache->inCache("targetfolder"));
+ $this->assertTrue($this->cache->inCache("targetfolder/sub"));
+ }
+
public function testGetIncomplete() {
$file1 = 'folder1';
$file2 = 'folder2';