Amazons3MultiPartTest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\files_external\tests\Storage;
  7. use OCA\Files_External\Lib\Storage\AmazonS3;
  8. /**
  9. * Class Amazons3Test
  10. *
  11. * @group DB
  12. *
  13. * @package OCA\Files_External\Tests\Storage
  14. */
  15. class Amazons3MultiPartTest extends \Test\Files\Storage\Storage {
  16. private $config;
  17. /** @var AmazonS3 */
  18. protected $instance;
  19. protected function setUp(): void {
  20. parent::setUp();
  21. $this->config = include('files_external/tests/config.amazons3.php');
  22. if (! is_array($this->config) or ! $this->config['run']) {
  23. $this->markTestSkipped('AmazonS3 backend not configured');
  24. }
  25. $this->instance = new AmazonS3($this->config + [
  26. 'putSizeLimit' => 1,
  27. 'copySizeLimit' => 1,
  28. ]);
  29. }
  30. protected function tearDown(): void {
  31. if ($this->instance) {
  32. $this->instance->rmdir('');
  33. }
  34. parent::tearDown();
  35. }
  36. public function testStat(): void {
  37. $this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
  38. }
  39. public function testHashInFileName(): void {
  40. $this->markTestSkipped('Localstack has a bug with hashes in filename');
  41. }
  42. }