Skip to content

Commit

Permalink
Move app loading in encryption trait below config value changes
Browse files Browse the repository at this point in the history
Signed-off-by: Morris Jobke <[email protected]>
  • Loading branch information
MorrisJobke committed Nov 23, 2020
1 parent d562ec9 commit 1e89772
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/lib/Traits/EncryptionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,16 @@ protected function setUpEncryptionTrait() {
$this->markTestSkipped('Encryption not ready');
}

\OC_App::loadApp('encryption');

$this->encryptionApp = new Application([], $isReady);

$this->config = \OC::$server->getConfig();
$this->encryptionWasEnabled = $this->config->getAppValue('core', 'encryption_enabled', 'no');
$this->originalEncryptionModule = $this->config->getAppValue('core', 'default_encryption_module');
$this->config->setAppValue('core', 'default_encryption_module', \OCA\Encryption\Crypto\Encryption::ID);
$this->config->setAppValue('core', 'encryption_enabled', 'yes');

\OC_App::loadApp('encryption');

$this->encryptionApp = new Application();

$this->assertTrue(\OC::$server->getEncryptionManager()->isEnabled());
}

Expand Down

0 comments on commit 1e89772

Please sign in to comment.