2023-11-29 11:31:34 -05:00
|
|
|
<?php
|
2025-05-17 05:46:26 -04:00
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2023-11-29 11:31:34 -05:00
|
|
|
/**
|
2024-06-06 03:55:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-11-29 11:31:34 -05:00
|
|
|
*/
|
2025-06-06 08:25:27 -04:00
|
|
|
namespace OCA\Files_External\Tests\Storage;
|
2023-11-29 11:31:34 -05:00
|
|
|
|
|
|
|
|
use OCA\Files_External\Lib\Storage\AmazonS3;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Amazons3Test
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @package OCA\Files_External\Tests\Storage
|
|
|
|
|
*/
|
2026-01-07 08:21:48 -05:00
|
|
|
#[\PHPUnit\Framework\Attributes\Group(name: 'DB')]
|
|
|
|
|
#[\PHPUnit\Framework\Attributes\Group(name: 'S3')]
|
2023-11-29 11:31:34 -05:00
|
|
|
class Amazons3MultiPartTest extends \Test\Files\Storage\Storage {
|
2025-09-26 03:39:33 -04:00
|
|
|
use ConfigurableStorageTrait;
|
2023-11-29 11:31:34 -05:00
|
|
|
/** @var AmazonS3 */
|
|
|
|
|
protected $instance;
|
|
|
|
|
|
|
|
|
|
protected function setUp(): void {
|
|
|
|
|
parent::setUp();
|
|
|
|
|
|
2025-12-18 10:10:06 -05:00
|
|
|
$this->loadConfig(__DIR__ . '/../config.amazons3.php');
|
2025-09-26 03:39:33 -04:00
|
|
|
|
2023-11-29 11:31:34 -05:00
|
|
|
$this->instance = new AmazonS3($this->config + [
|
|
|
|
|
'putSizeLimit' => 1,
|
|
|
|
|
'copySizeLimit' => 1,
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function tearDown(): void {
|
|
|
|
|
if ($this->instance) {
|
|
|
|
|
$this->instance->rmdir('');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
parent::tearDown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testStat(): void {
|
|
|
|
|
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
|
|
|
|
|
}
|
|
|
|
|
}
|