Skip to content

Commit 9fa9ffd

Browse files
committed
test: reenable localstack tests (bug fixed) but disable MinIO versioned copy test
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent e79e1e2 commit 9fa9ffd

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

.github/workflows/files-external-s3.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444

4545
strategy:
4646
matrix:
47-
php-versions: ['8.1', '8.2', '8.3', '8.4']
47+
php-versions: ['8.1', '8.2', '8.4']
4848
include:
49-
- php-versions: '8.2'
49+
- php-versions: '8.3'
5050
coverage: ${{ github.event_name != 'pull_request' }}
5151

5252
name: php${{ matrix.php-versions }}-s3
@@ -87,7 +87,7 @@ jobs:
8787
composer install
8888
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
8989
./occ app:enable --force files_external
90-
echo "<?php return ['run' => true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => '$OBJECT_STORE_KEY','secret' => '$OBJECT_STORE_SECRET', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/files_external/tests/config.amazons3.php
90+
echo "<?php return ['run' => true, 'minio' => true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => '$OBJECT_STORE_KEY','secret' => '$OBJECT_STORE_SECRET', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/files_external/tests/config.amazons3.php
9191
9292
- name: Wait for S3
9393
run: |
@@ -122,7 +122,7 @@ jobs:
122122

123123
strategy:
124124
matrix:
125-
php-versions: ['8.1', '8.2', '8.3']
125+
php-versions: ['8.1', '8.2', '8.4']
126126
include:
127127
- php-versions: '8.3'
128128
coverage: true

apps/files_external/tests/Storage/Amazons3MultiPartTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,4 @@ protected function tearDown(): void {
4444
public function testStat(): void {
4545
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
4646
}
47-
48-
public function testHashInFileName(): void {
49-
if (isset($this->config['localstack'])) {
50-
$this->markTestSkipped('Localstack has a bug with hashes in filename');
51-
}
52-
53-
parent::testHashInFileName();
54-
}
5547
}

apps/files_external/tests/Storage/Amazons3Test.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
* @package OCA\Files_External\Tests\Storage
1818
*/
1919
class Amazons3Test extends \Test\Files\Storage\Storage {
20-
private $config;
20+
protected $config;
2121
/** @var AmazonS3 */
2222
protected $instance;
2323

2424
protected function setUp(): void {
2525
parent::setUp();
2626

2727
$this->config = include('files_external/tests/config.amazons3.php');
28-
if (! is_array($this->config) or ! $this->config['run']) {
28+
if (!is_array($this->config) || !$this->config['run']) {
2929
$this->markTestSkipped('AmazonS3 backend not configured');
3030
}
3131
$this->instance = new AmazonS3($this->config);
@@ -42,11 +42,4 @@ protected function tearDown(): void {
4242
public function testStat(): void {
4343
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
4444
}
45-
46-
public function testHashInFileName(): void {
47-
if (isset($this->config['localstack'])) {
48-
$this->markTestSkipped('Localstack has a bug with hashes in filename');
49-
}
50-
parent::testHashInFileName();
51-
}
5245
}

apps/files_external/tests/Storage/VersionedAmazonS3Test.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@ protected function setUp(): void {
2626
$this->markTestSkipped("s3 backend doesn't seem to support versioning");
2727
}
2828
}
29+
30+
public function testCopyOverWriteDirectory(): void {
31+
if (isset($this->config['minio'])) {
32+
$this->markTestSkipped('MinIO has a bug with batch deletion on versioned storages, see https://github.com/minio/minio/issues/21366');
33+
}
34+
35+
parent::testCopyOverWriteDirectory();
36+
}
2937
}

0 commit comments

Comments
 (0)