From: Vincent Petry Date: Fri, 10 Apr 2015 11:43:57 +0000 (+0200) Subject: Clear leftover shares from other tests X-Git-Tag: v8.1.0alpha1~34^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4a225aa12c58a9a2b4bc8dae71b1bd3cb74238ce;p=nextcloud-server.git Clear leftover shares from other tests --- diff --git a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php b/apps/files_sharing/tests/deleteorphanedsharesjobtest.php index 20f3bcd5ebd..8b5afcb9149 100644 --- a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php +++ b/apps/files_sharing/tests/deleteorphanedsharesjobtest.php @@ -70,6 +70,8 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); + // clear occasional leftover shares from other tests + $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`'); $this->user1 = $this->getUniqueID('user1_'); $this->user2 = $this->getUniqueID('user2_'); @@ -84,7 +86,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { } protected function tearDown() { - $this->connection->executeUpdate('DELETE FROM `*PREFIX*share` WHERE `item_type` in (\'file\', \'folder\')'); + $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`'); $userManager = \OC::$server->getUserManager(); $user1 = $userManager->get($this->user1);