summaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-07-30 15:43:15 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-07-31 10:47:02 +0200
commit2f4bebb045be8605742ed566b07dfcbf4be1fde8 (patch)
tree3873337331dc6a562f96c03ab945d1203382aa20 /apps/encryption/tests
parent80810ae10fc7ea40a8ffe1c6f4672f5f2096f402 (diff)
downloadnextcloud-server-2f4bebb045be8605742ed566b07dfcbf4be1fde8.tar.gz
nextcloud-server-2f4bebb045be8605742ed566b07dfcbf4be1fde8.zip
only update database on the first run (first run = we have a version number from the old encryption app)
Diffstat (limited to 'apps/encryption/tests')
-rw-r--r--apps/encryption/tests/lib/MigrationTest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/encryption/tests/lib/MigrationTest.php b/apps/encryption/tests/lib/MigrationTest.php
index a05418c5f26..5bc3b89b5b9 100644
--- a/apps/encryption/tests/lib/MigrationTest.php
+++ b/apps/encryption/tests/lib/MigrationTest.php
@@ -306,6 +306,7 @@ class MigrationTest extends \Test\TestCase {
$this->prepareDB();
$m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger);
+ $this->invokePrivate($m, 'installedVersion', ['0.7']);
$m->updateDB();
$this->verifyDB('*PREFIX*appconfig', 'files_encryption', 0);
@@ -325,6 +326,7 @@ class MigrationTest extends \Test\TestCase {
$config->setUserValue(self::TEST_ENCRYPTION_MIGRATION_USER1, 'encryption', 'recoverKeyEnabled', '9');
$m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger);
+ $this->invokePrivate($m, 'installedVersion', ['0.7']);
$m->updateDB();
$this->verifyDB('*PREFIX*appconfig', 'files_encryption', 0);
@@ -388,6 +390,7 @@ class MigrationTest extends \Test\TestCase {
public function testUpdateFileCache() {
$this->prepareFileCache();
$m = new Migration(\OC::$server->getConfig(), new \OC\Files\View(), \OC::$server->getDatabaseConnection(), $this->logger);
+ $this->invokePrivate($m, 'installedVersion', ['0.7']);
self::invokePrivate($m, 'updateFileCache');
// check results