aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/Config/UserPlaceholderHandlerTest.php2
-rw-r--r--apps/files_external/tests/Service/DBConfigServiceTest.php2
-rw-r--r--apps/files_external/tests/Service/GlobalStoragesServiceTest.php2
-rw-r--r--apps/files_external/tests/Storage/Amazons3MultiPartTest.php9
-rw-r--r--apps/files_external/tests/Storage/Amazons3Test.php9
-rw-r--r--apps/files_external/tests/Storage/VersionedAmazonS3Test.php9
6 files changed, 18 insertions, 15 deletions
diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
index c46d3ed5010..b40e9461287 100644
--- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
+++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
@@ -5,7 +5,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-namespace OCA\files_external\tests\Config;
+namespace OCA\Files_External\Tests\Config;
use OCA\Files_External\Config\UserPlaceholderHandler;
use OCP\IRequest;
diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php
index c902aa28270..85d8b70fda7 100644
--- a/apps/files_external/tests/Service/DBConfigServiceTest.php
+++ b/apps/files_external/tests/Service/DBConfigServiceTest.php
@@ -70,7 +70,7 @@ class DBConfigServiceTest extends TestCase {
$this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null);
$mount = $this->dbConfig->getMountById($id);
- $this->assertEquals([
+ $this->assertEqualsCanonicalizing([
['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id],
['type' => DBConfigService::APPLICABLE_TYPE_GROUP, 'value' => 'bar', 'mount_id' => $id],
['type' => DBConfigService::APPLICABLE_TYPE_GLOBAL, 'value' => null, 'mount_id' => $id]
diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
index 1a1754799dc..47be54a02d4 100644
--- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
+++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
@@ -168,7 +168,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTestCase {
$this->assertEquals($updatedStorage->getMountPoint(), $newStorage->getMountPoint());
$this->assertEquals($updatedStorage->getBackendOptions()['password'], $newStorage->getBackendOptions()['password']);
- $this->assertEquals($updatedStorage->getApplicableUsers(), $newStorage->getApplicableUsers());
+ $this->assertEqualsCanonicalizing($updatedStorage->getApplicableUsers(), $newStorage->getApplicableUsers());
$this->assertEquals($updatedStorage->getApplicableGroups(), $newStorage->getApplicableGroups());
$this->assertEquals($updatedStorage->getPriority(), $newStorage->getPriority());
$this->assertEquals(0, $newStorage->getStatus());
diff --git a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
index 641f00d5147..aa3925899f3 100644
--- a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
+++ b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
@@ -5,7 +5,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-namespace OCA\files_external\tests\Storage;
+namespace OCA\Files_External\Tests\Storage;
use OCA\Files_External\Lib\Storage\AmazonS3;
@@ -13,6 +13,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
* Class Amazons3Test
*
* @group DB
+ * @group S3
*
* @package OCA\Files_External\Tests\Storage
*/
@@ -25,7 +26,7 @@ class Amazons3MultiPartTest extends \Test\Files\Storage\Storage {
parent::setUp();
$this->config = include('files_external/tests/config.amazons3.php');
- if (! is_array($this->config) or ! $this->config['run']) {
+ if (!is_array($this->config) || !$this->config['run']) {
$this->markTestSkipped('AmazonS3 backend not configured');
}
$this->instance = new AmazonS3($this->config + [
@@ -45,8 +46,4 @@ class Amazons3MultiPartTest extends \Test\Files\Storage\Storage {
public function testStat(): void {
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
}
-
- public function testHashInFileName(): void {
- $this->markTestSkipped('Localstack has a bug with hashes in filename');
- }
}
diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php
index 6d27b0b3253..d02dec0230c 100644
--- a/apps/files_external/tests/Storage/Amazons3Test.php
+++ b/apps/files_external/tests/Storage/Amazons3Test.php
@@ -14,11 +14,12 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
* Class Amazons3Test
*
* @group DB
+ * @group S3
*
* @package OCA\Files_External\Tests\Storage
*/
class Amazons3Test extends \Test\Files\Storage\Storage {
- private $config;
+ protected $config;
/** @var AmazonS3 */
protected $instance;
@@ -26,7 +27,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage {
parent::setUp();
$this->config = include('files_external/tests/config.amazons3.php');
- if (! is_array($this->config) or ! $this->config['run']) {
+ if (!is_array($this->config) || !$this->config['run']) {
$this->markTestSkipped('AmazonS3 backend not configured');
}
$this->instance = new AmazonS3($this->config);
@@ -43,8 +44,4 @@ class Amazons3Test extends \Test\Files\Storage\Storage {
public function testStat(): void {
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
}
-
- public function testHashInFileName(): void {
- $this->markTestSkipped('Localstack has a bug with hashes in filename');
- }
}
diff --git a/apps/files_external/tests/Storage/VersionedAmazonS3Test.php b/apps/files_external/tests/Storage/VersionedAmazonS3Test.php
index 4d9d1e32067..9d413620292 100644
--- a/apps/files_external/tests/Storage/VersionedAmazonS3Test.php
+++ b/apps/files_external/tests/Storage/VersionedAmazonS3Test.php
@@ -10,6 +10,7 @@ namespace OCA\Files_External\Tests\Storage;
/**
* @group DB
+ * @group S3
*/
class VersionedAmazonS3Test extends Amazons3Test {
protected function setUp(): void {
@@ -25,4 +26,12 @@ class VersionedAmazonS3Test extends Amazons3Test {
$this->markTestSkipped("s3 backend doesn't seem to support versioning");
}
}
+
+ public function testCopyOverWriteDirectory(): void {
+ if (isset($this->config['minio'])) {
+ $this->markTestSkipped('MinIO has a bug with batch deletion on versioned storages, see https://github.com/minio/minio/issues/21366');
+ }
+
+ parent::testCopyOverWriteDirectory();
+ }
}