]> source.dussan.org Git - nextcloud-server.git/commitdiff
better cleanup in share tests 21773/head
authorRobin Appelman <robin@icewind.nl>
Wed, 8 Jul 2020 13:32:11 +0000 (15:32 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 9 Jul 2020 12:33:29 +0000 (12:33 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/tests/EtagPropagationTest.php
apps/files_sharing/tests/TestCase.php

index bcab1a92bb8eddcc0092687c21180ceb5dd8c290..6ab1051c558a08c045264ec1aaebb8fca6320df1 100644 (file)
@@ -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);
 
index 8ea72943be47fc3e6d904bcd445ca452298593c9..b0c122b8fe63b00b587e566ad7ec88f3ae114064 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();
        }