diff options
author | Robin Appelman <robin@icewind.nl> | 2024-08-15 18:04:55 +0200 |
---|---|---|
committer | Louis <louis@chmn.me> | 2024-08-28 14:54:14 +0200 |
commit | b2645590cef45a99ee7c7d549f65b3432b81e422 (patch) | |
tree | cb78deb24c83ca555c77c75fab8f9cf470081d96 /tests/lib | |
parent | dc5f0f5fb73f9848ce0fa3f797ac4c817802d33f (diff) | |
download | nextcloud-server-b2645590cef45a99ee7c7d549f65b3432b81e422.tar.gz nextcloud-server-b2645590cef45a99ee7c7d549f65b3432b81e422.zip |
fix: implement sharding compatible cleanup for various bits
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Preview/BackgroundCleanupJobTest.php | 8 | ||||
-rw-r--r-- | tests/lib/Repair/CleanTagsTest.php | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/tests/lib/Preview/BackgroundCleanupJobTest.php b/tests/lib/Preview/BackgroundCleanupJobTest.php index c07ec42b36b..ccd5dba69cf 100644 --- a/tests/lib/Preview/BackgroundCleanupJobTest.php +++ b/tests/lib/Preview/BackgroundCleanupJobTest.php @@ -146,6 +146,10 @@ class BackgroundCleanupJobTest extends \Test\TestCase { } public function testCleanupAjax() { + if ($this->connection->getShardDefinition('filecache')) { + $this->markTestSkipped("ajax cron is not supported for sharded setups"); + return; + } $files = $this->setup11Previews(); $fileIds = array_map(function (File $f) { return $f->getId(); @@ -174,6 +178,10 @@ class BackgroundCleanupJobTest extends \Test\TestCase { } public function testOldPreviews() { + if ($this->connection->getShardDefinition('filecache')) { + $this->markTestSkipped("old previews are not supported for sharded setups"); + return; + } $appdata = \OC::$server->getAppDataDir('preview'); $f1 = $appdata->newFolder('123456781'); diff --git a/tests/lib/Repair/CleanTagsTest.php b/tests/lib/Repair/CleanTagsTest.php index 5e7b82d2198..80c0b2c9770 100644 --- a/tests/lib/Repair/CleanTagsTest.php +++ b/tests/lib/Repair/CleanTagsTest.php @@ -194,13 +194,4 @@ class CleanTagsTest extends \Test\TestCase { $this->createdFile = (int) $this->getLastInsertID('filecache', 'fileid'); return $this->createdFile; } - - /** - * @param $tableName - * @param $idName - * @return int - */ - protected function getLastInsertID($tableName, $idName) { - return $this->connection->lastInsertId("*PREFIX*$tableName"); - } } |