Skip to content

Commit

Permalink
tests: fix share provider tests for sharding
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 23, 2024
1 parent 18bb378 commit 165e407
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/lib/Share20/DefaultShareProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function setUp(): void {

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();
}

Expand Down Expand Up @@ -918,10 +918,10 @@ private function createTestFileEntry($path, $storage = 1) {
$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();
Expand Down

0 comments on commit 165e407

Please sign in to comment.