summaryrefslogtreecommitdiffstats
path: root/tests/lib/Traits/MountProviderTrait.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-07-08 13:58:04 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2020-07-09 11:14:44 +0200
commit37c334a2a6480422f5471dabdf47461148dda147 (patch)
tree0ffd4960129de96f8cd7e4511d6de7c39529ad7c /tests/lib/Traits/MountProviderTrait.php
parente0fbf4d0338d4e8fff4658d2b03618770e5ddd7d (diff)
downloadnextcloud-server-37c334a2a6480422f5471dabdf47461148dda147.tar.gz
nextcloud-server-37c334a2a6480422f5471dabdf47461148dda147.zip
ensure mounts are scanned during tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Traits/MountProviderTrait.php')
-rw-r--r--tests/lib/Traits/MountProviderTrait.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/lib/Traits/MountProviderTrait.php b/tests/lib/Traits/MountProviderTrait.php
index 0437157e84f..379d33ea71c 100644
--- a/tests/lib/Traits/MountProviderTrait.php
+++ b/tests/lib/Traits/MountProviderTrait.php
@@ -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) {