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 <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Jul 8, 2020
1 parent 4757cf0 commit 071603f
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 @@ -127,6 +127,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 071603f

Please sign in to comment.