Amazons3Test.php 1.9 KB

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