summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-07-08 15:32:11 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-07-09 12:33:29 +0000
commit498a1d029387518330484df72390ad50dc2b5bbe (patch)
treedf0ca28a674d0e8b829038576fb88017be99c749
parentcc35da4d28ed4da9ad7b11a3a907cc99c535b10a (diff)
downloadnextcloud-server-498a1d029387518330484df72390ad50dc2b5bbe.tar.gz
nextcloud-server-498a1d029387518330484df72390ad50dc2b5bbe.zip
better cleanup in share tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--apps/files_sharing/tests/EtagPropagationTest.php2
-rw-r--r--apps/files_sharing/tests/TestCase.php8
2 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/EtagPropagationTest.php b/apps/files_sharing/tests/EtagPropagationTest.php
index bcab1a92bb8..6ab1051c558 100644
--- a/apps/files_sharing/tests/EtagPropagationTest.php
+++ b/apps/files_sharing/tests/EtagPropagationTest.php
@@ -126,6 +126,8 @@ class EtagPropagationTest extends PropagationTestCase {
$view2 = new View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files');
$view2->mkdir('/sub1/sub2');
$view2->rename('/folder', '/sub1/sub2/folder');
+ $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+
$insideInfo = $view2->getFileInfo('/sub1/sub2/folder/inside');
$this->assertInstanceOf('\OC\Files\FileInfo', $insideInfo);
diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php
index 8ea72943be4..b0c122b8fe6 100644
--- a/apps/files_sharing/tests/TestCase.php
+++ b/apps/files_sharing/tests/TestCase.php
@@ -125,6 +125,14 @@ abstract class TestCase extends \Test\TestCase {
$qb->delete('share');
$qb->execute();
+ $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+ $qb->delete('mounts');
+ $qb->execute();
+
+ $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+ $qb->delete('filecache');
+ $qb->execute();
+
parent::tearDown();
}