summaryrefslogtreecommitdiffstats
path: root/tests/lib/files/cache/updater.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-06-03 17:57:56 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-06-05 08:22:01 +0200
commitda3974bcb210a6580c974e1b2efebcae26ccf708 (patch)
treede4dbee3b1e0baacd6ba3600773a4178142181ed /tests/lib/files/cache/updater.php
parentade6ed37976b405322e428df8c6697116fc9692f (diff)
downloadnextcloud-server-da3974bcb210a6580c974e1b2efebcae26ccf708.tar.gz
nextcloud-server-da3974bcb210a6580c974e1b2efebcae26ccf708.zip
- drop permissions table and related code
- the file/folder's permission is now stored in the file cache - BackGroundWatcher has been removed - this has meanwhile be replaced by occ files:scan which can be executed in a cron jobs - increase version to trigger database migration
Diffstat (limited to 'tests/lib/files/cache/updater.php')
-rw-r--r--tests/lib/files/cache/updater.php31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/lib/files/cache/updater.php b/tests/lib/files/cache/updater.php
index e2fae0ae57f..b874e418100 100644
--- a/tests/lib/files/cache/updater.php
+++ b/tests/lib/files/cache/updater.php
@@ -328,35 +328,4 @@ class Updater extends \PHPUnit_Framework_TestCase {
$this->assertEquals($time, $cachedData['mtime']);
}
- public function testUpdatePermissionsOnRescanOnlyForUpdatedFile() {
- $permissionsCache = $this->storage->getPermissionsCache();
- $scanner = $this->storage->getScanner();
- $scanner->scan('');
- $cache = $this->storage->getCache();
- $loggedInUser = \OC_User::getUser();
- \OC_User::setUserId(self::$user);
- FileSystem::getDirectoryContent('/');
- $past = time() - 600;
- $cache->put('', array('storage_mtime' => $past));
-
- $this->assertNotEquals(-1, $permissionsCache->get($cache->getId('foo.txt'), self::$user));
- $this->assertNotEquals(-1, $permissionsCache->get($cache->getId('foo.png'), self::$user));
-
- $permissionsCache->set($cache->getId('foo.png'), self::$user, 15);
- FileSystem::file_put_contents('/foo.txt', 'asd');
-
- $this->assertEquals(-1, $permissionsCache->get($cache->getId('foo.txt'), self::$user));
- $this->assertEquals(15, $permissionsCache->get($cache->getId('foo.png'), self::$user));
-
- FileSystem::getDirectoryContent('/');
-
- $this->assertEquals(15, $permissionsCache->get($cache->getId('foo.png'), self::$user));
-
- FileSystem::file_put_contents('/qwerty.txt', 'asd');
- FileSystem::getDirectoryContent('/');
-
- $this->assertEquals(15, $permissionsCache->get($cache->getId('foo.png'), self::$user));
-
- \OC_User::setUserId($loggedInUser);
- }
}