Skip to content

Commit 5f200c7

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 22b9d91 commit 5f200c7

4 files changed

Lines changed: 14 additions & 21 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
strategy:
4646
fail-fast: false
4747
matrix:
48-
php-versions: ['8.1', '8.2', '8.3', '8.4']
48+
php-versions: ['8.1', '8.2', '8.4']
4949
include:
50-
- php-versions: '8.2'
50+
- php-versions: '8.3'
5151
coverage: ${{ github.event_name != 'pull_request' }}
5252

5353
name: php${{ matrix.php-versions }}-s3-minio
@@ -88,7 +88,7 @@ jobs:
8888
composer install
8989
./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
9090
./occ app:enable --force files_external
91-
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
91+
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
9292
9393
- name: Wait for S3
9494
run: |
@@ -134,7 +134,7 @@ jobs:
134134

135135
strategy:
136136
matrix:
137-
php-versions: ['8.1', '8.2', '8.3']
137+
php-versions: ['8.1', '8.2', '8.4']
138138
include:
139139
- php-versions: '8.3'
140140
coverage: ${{ github.event_name != 'pull_request' }}

apps/files_external/tests/Storage/Amazons3MultiPartTest.php

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

apps/files_external/tests/Storage/Amazons3Test.php

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

2626
protected function setUp(): void {
2727
parent::setUp();
2828

2929
$this->config = include('files_external/tests/config.amazons3.php');
30-
if (! is_array($this->config) or ! $this->config['run']) {
30+
if (!is_array($this->config) || !$this->config['run']) {
3131
$this->markTestSkipped('AmazonS3 backend not configured');
3232
}
3333
$this->instance = new AmazonS3($this->config);
@@ -44,11 +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-
parent::testHashInFileName();
53-
}
5447
}

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)