diff options
author | Robin Appelman <robin@icewind.nl> | 2025-05-27 19:35:41 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-06-02 09:56:30 +0000 |
commit | 5f45b4f5fcd13766dc33bb55d838865854ade88d (patch) | |
tree | 33f94ae055f7b3ce3f861f2b8353fb68406f82aa | |
parent | edfb7b2393426429ceadb1cdd5d935d2be50bceb (diff) | |
download | nextcloud-server-backport/52242/stable31.tar.gz nextcloud-server-backport/52242/stable31.zip |
test: add test that object store folder copy preserves folder sizebackport/52242/stable31
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php index 3dbdc3afc27..508f328fae2 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php @@ -262,4 +262,17 @@ class ObjectStoreStorageTest extends Storage { $this->assertTrue($cache->inCache('new.txt')); $this->assertEquals(\OCP\Constants::PERMISSION_ALL, $instance->getPermissions('new.txt')); } + + public function testCopyFolderSize(): void { + $cache = $this->instance->getCache(); + + $this->instance->mkdir('source'); + $this->instance->file_put_contents('source/test.txt', 'foo'); + $this->instance->getUpdater()->update('source/test.txt'); + $this->assertEquals(3, $cache->get('source')->getSize()); + + $this->assertTrue($this->instance->copy('source', 'target')); + + $this->assertEquals(3, $cache->get('target')->getSize()); + } } |