From: Robin Appelman Date: Wed, 8 Jul 2020 13:32:11 +0000 (+0200) Subject: better cleanup in share tests X-Git-Tag: v20.0.0beta1~280^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F21489%2Fhead;p=nextcloud-server.git better cleanup in share tests Signed-off-by: Robin Appelman --- diff --git a/apps/files_sharing/tests/EtagPropagationTest.php b/apps/files_sharing/tests/EtagPropagationTest.php index ee2f5b204e3..7ba01b737e7 100644 --- a/apps/files_sharing/tests/EtagPropagationTest.php +++ b/apps/files_sharing/tests/EtagPropagationTest.php @@ -128,6 +128,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 a201974de45..34924110b30 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(); }