]> source.dussan.org Git - nextcloud-server.git/commitdiff
better cleanup in share tests 21489/head
authorRobin Appelman <robin@icewind.nl>
Wed, 8 Jul 2020 13:32:11 +0000 (15:32 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 9 Jul 2020 09:14:45 +0000 (11:14 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/tests/EtagPropagationTest.php
apps/files_sharing/tests/TestCase.php

index ee2f5b204e3e13eaf771c46411fdee07cbbd2a65..7ba01b737e78e320c069284bfafc841e27ab7419 100644 (file)
@@ -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);
 
index a201974de452a1a57cfdd5b16915bcd3243612a7..34924110b30fa5ef6e810a10f7b2d916eacd3b2a 100644 (file)
@@ -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();
        }