Skip to content

Commit

Permalink
better cleanup in share tests
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and rullzer committed Jul 9, 2020
1 parent c1beca7 commit 25c4591
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/files_sharing/tests/EtagPropagationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ protected function setUpShares() {
$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);

Expand Down
8 changes: 8 additions & 0 deletions apps/files_sharing/tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ protected function tearDown(): void {
$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();
}

Expand Down

0 comments on commit 25c4591

Please sign in to comment.