summaryrefslogtreecommitdiffstats
path: root/tests/lib/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-10-30 13:41:10 +0100
committerRobin Appelman <icewind@owncloud.com>2013-10-30 13:41:10 +0100
commitc9f3f2874f3136342965a1d255d030de87725519 (patch)
tree8a9ca523992d2b461d71c3483bd1e0b31dae4f7a /tests/lib/files
parent654b0daf0145b216d81347325b17cf522a49ec81 (diff)
parent4c964cbbbe2b92d6220410cda5e7905e529fc713 (diff)
downloadnextcloud-server-c9f3f2874f3136342965a1d255d030de87725519.tar.gz
nextcloud-server-c9f3f2874f3136342965a1d255d030de87725519.zip
Merge branch 'master' into update-parent-storage-mtime
Conflicts: lib/private/files/cache/updater.php
Diffstat (limited to 'tests/lib/files')
-rw-r--r--tests/lib/files/cache/updater.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/files/cache/updater.php b/tests/lib/files/cache/updater.php
index d8414dadbec..e3d3aae818d 100644
--- a/tests/lib/files/cache/updater.php
+++ b/tests/lib/files/cache/updater.php
@@ -22,6 +22,8 @@ class Updater extends \PHPUnit_Framework_TestCase {
*/
private $scanner;
+ private $stateFilesEncryption;
+
/**
* @var \OC\Files\Cache\Cache $cache
*/
@@ -30,6 +32,12 @@ class Updater extends \PHPUnit_Framework_TestCase {
private static $user;
public function setUp() {
+
+ // remember files_encryption state
+ $this->stateFilesEncryption = \OC_App::isEnabled('files_encryption');
+ // we want to tests with the encryption app disabled
+ \OC_App::disable('files_encryption');
+
$this->storage = new \OC\Files\Storage\Temporary(array());
$textData = "dummy file data\n";
$imgData = file_get_contents(\OC::$SERVERROOT . '/core/img/logo.png');
@@ -47,6 +55,10 @@ class Updater extends \PHPUnit_Framework_TestCase {
if (!self::$user) {
self::$user = uniqid();
}
+
+ \OC_User::createUser(self::$user, 'password');
+ \OC_User::setUserId(self::$user);
+
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
Filesystem::clearMounts();
@@ -64,7 +76,13 @@ class Updater extends \PHPUnit_Framework_TestCase {
if ($this->cache) {
$this->cache->clear();
}
+ $result = \OC_User::deleteUser(self::$user);
+ $this->assertTrue($result);
Filesystem::tearDown();
+ // reset app files_encryption
+ if ($this->stateFilesEncryption) {
+ \OC_App::enable('files_encryption');
+ }
}
public function testWrite() {