ensure mounts are scanned during tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
2ba6879937
commit
b95ba97d27
|
@ -441,7 +441,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
|
|||
}
|
||||
}
|
||||
|
||||
private function IsDatabaseAccessAllowed() {
|
||||
protected function IsDatabaseAccessAllowed() {
|
||||
// on travis-ci.org we allow database access in any case - otherwise
|
||||
// this will break all apps right away
|
||||
if (true == getenv('TRAVIS')) {
|
||||
|
|
|
@ -33,6 +33,12 @@ trait MountProviderTrait {
|
|||
$this->mounts[$userId] = [];
|
||||
}
|
||||
$this->mounts[$userId][] = ['storage' => $storage, 'mountPoint' => $mountPoint, 'arguments' => $arguments];
|
||||
|
||||
if ($this->IsDatabaseAccessAllowed()) {
|
||||
$mount = new MountPoint($storage, $mountPoint, $arguments, $this->storageFactory);
|
||||
$storage = $mount->getStorage();
|
||||
$storage->getScanner()->scan('');
|
||||
}
|
||||
}
|
||||
|
||||
protected function registerStorageWrapper($name, $wrapper) {
|
||||
|
|
Loading…
Reference in New Issue