Amazons3Test.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  6. * @author Joas Schilling <coding@schilljs.com>
  7. * @author Michael Gapczynski <GapczynskiM@gmail.com>
  8. * @author Robin Appelman <robin@icewind.nl>
  9. * @author Robin McCorkell <robin@mccorkell.me.uk>
  10. * @author Roeland Jago Douma <roeland@famdouma.nl>
  11. * @author Thomas Müller <thomas.mueller@tmit.eu>
  12. *
  13. * @license AGPL-3.0
  14. *
  15. * This code is free software: you can redistribute it and/or modify
  16. * it under the terms of the GNU Affero General Public License, version 3,
  17. * as published by the Free Software Foundation.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU Affero General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU Affero General Public License, version 3,
  25. * along with this program. If not, see <http://www.gnu.org/licenses/>
  26. *
  27. */
  28. namespace OCA\Files_External\Tests\Storage;
  29. use OCA\Files_External\Lib\Storage\AmazonS3;
  30. /**
  31. * Class Amazons3Test
  32. *
  33. * @group DB
  34. *
  35. * @package OCA\Files_External\Tests\Storage
  36. */
  37. class Amazons3Test extends \Test\Files\Storage\Storage {
  38. private $config;
  39. /** @var AmazonS3 */
  40. protected $instance;
  41. protected function setUp(): void {
  42. parent::setUp();
  43. $this->config = include('files_external/tests/config.amazons3.php');
  44. if (! is_array($this->config) or ! $this->config['run']) {
  45. $this->markTestSkipped('AmazonS3 backend not configured');
  46. }
  47. $this->instance = new AmazonS3($this->config);
  48. }
  49. protected function tearDown(): void {
  50. if ($this->instance) {
  51. $this->instance->rmdir('');
  52. }
  53. parent::tearDown();
  54. }
  55. public function testStat() {
  56. $this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
  57. }
  58. public function testHashInFileName() {
  59. $this->markTestSkipped('Localstack has a bug with hashes in filename');
  60. }
  61. }