better cleanup in share tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2020-07-08 15:32:11 +02:00 committed by backportbot[bot]
parent 157f619812
commit 379cfdda3c
2 changed files with 10 additions and 0 deletions

View File

@ -127,6 +127,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);

View 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();
}