Amazons3Test.php 1.1 KB

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