aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Share20/DefaultShareProviderTest.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-07-19 19:31:10 +0200
committerLouis <louis@chmn.me>2024-08-28 14:54:14 +0200
commit1b6d76aa1b475a72e601aed4b9c7a272f3e38f21 (patch)
treeb4c69f74b9bff4fd67d585b6917af4479bb56bea /tests/lib/Share20/DefaultShareProviderTest.php
parent0e40fa4fa5cbd243dd4a047cdb574bff124b72b6 (diff)
downloadnextcloud-server-1b6d76aa1b475a72e601aed4b9c7a272f3e38f21.tar.gz
nextcloud-server-1b6d76aa1b475a72e601aed4b9c7a272f3e38f21.zip
test: fix share provider tests for sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Share20/DefaultShareProviderTest.php')
-rw-r--r--tests/lib/Share20/DefaultShareProviderTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php
index 017deeef114..e498d497427 100644
--- a/tests/lib/Share20/DefaultShareProviderTest.php
+++ b/tests/lib/Share20/DefaultShareProviderTest.php
@@ -111,7 +111,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
protected function tearDown(): void {
$this->dbConn->getQueryBuilder()->delete('share')->execute();
- $this->dbConn->getQueryBuilder()->delete('filecache')->execute();
+ $this->dbConn->getQueryBuilder()->delete('filecache')->runAcrossAllShards()->execute();
$this->dbConn->getQueryBuilder()->delete('storages')->execute();
}
@@ -924,10 +924,10 @@ class DefaultShareProviderTest extends \Test\TestCase {
$qb = $this->dbConn->getQueryBuilder();
$qb->insert('filecache')
->values([
- 'storage' => $qb->expr()->literal($storage),
- 'path' => $qb->expr()->literal($path),
- 'path_hash' => $qb->expr()->literal(md5($path)),
- 'name' => $qb->expr()->literal(basename($path)),
+ 'storage' => $qb->createNamedParameter($storage, IQueryBuilder::PARAM_INT),
+ 'path' => $qb->createNamedParameter($path),
+ 'path_hash' => $qb->createNamedParameter(md5($path)),
+ 'name' => $qb->createNamedParameter(basename($path)),
]);
$this->assertEquals(1, $qb->execute());
return $qb->getLastInsertId();